
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -3.5e+267)
(* t (+ (* a -4.0) (* 18.0 (* x (* y z)))))
(if (or (<= t -2e+68) (not (<= t 2e-28)))
(-
(+ (* b c) (* t (- (* y (* x (* 18.0 z))) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(-
(-
(+ (* b c) (- (* y (* (* x 18.0) (* z t))) (* t (* 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 (t <= -3.5e+267) {
tmp = t * ((a * -4.0) + (18.0 * (x * (y * z))));
} else if ((t <= -2e+68) || !(t <= 2e-28)) {
tmp = ((b * c) + (t * ((y * (x * (18.0 * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - (t * (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 (t <= (-3.5d+267)) then
tmp = t * ((a * (-4.0d0)) + (18.0d0 * (x * (y * z))))
else if ((t <= (-2d+68)) .or. (.not. (t <= 2d-28))) then
tmp = ((b * c) + (t * ((y * (x * (18.0d0 * z))) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = (((b * c) + ((y * ((x * 18.0d0) * (z * t))) - (t * (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 (t <= -3.5e+267) {
tmp = t * ((a * -4.0) + (18.0 * (x * (y * z))));
} else if ((t <= -2e+68) || !(t <= 2e-28)) {
tmp = ((b * c) + (t * ((y * (x * (18.0 * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - (t * (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 t <= -3.5e+267: tmp = t * ((a * -4.0) + (18.0 * (x * (y * z)))) elif (t <= -2e+68) or not (t <= 2e-28): tmp = ((b * c) + (t * ((y * (x * (18.0 * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - (t * (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 (t <= -3.5e+267) tmp = Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(x * Float64(y * z))))); elseif ((t <= -2e+68) || !(t <= 2e-28)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(y * Float64(x * Float64(18.0 * 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(Float64(y * Float64(Float64(x * 18.0) * Float64(z * t))) - Float64(t * Float64(a * 4.0)))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -3.5e+267)
tmp = t * ((a * -4.0) + (18.0 * (x * (y * z))));
elseif ((t <= -2e+68) || ~((t <= 2e-28)))
tmp = ((b * c) + (t * ((y * (x * (18.0 * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - (t * (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[t, -3.5e+267], N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -2e+68], N[Not[LessEqual[t, 2e-28]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(y * N[(x * N[(18.0 * z), $MachinePrecision]), $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[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $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 -3.5 \cdot 10^{+267}:\\
\;\;\;\;t \cdot \left(a \cdot -4 + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq -2 \cdot 10^{+68} \lor \neg \left(t \leq 2 \cdot 10^{-28}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(y \cdot \left(x \cdot \left(18 \cdot z\right)\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 + \left(y \cdot \left(\left(x \cdot 18\right) \cdot \left(z \cdot t\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -3.4999999999999999e267Initial program 45.5%
Simplified54.5%
Taylor expanded in t around inf 81.8%
Taylor expanded in t around inf 100.0%
if -3.4999999999999999e267 < t < -1.99999999999999991e68 or 1.99999999999999994e-28 < t Initial program 82.9%
Simplified87.6%
pow187.6%
associate-*l*87.6%
associate-*r*87.6%
Applied egg-rr87.6%
unpow187.6%
*-commutative87.6%
Simplified87.6%
pow187.6%
associate-*r*87.6%
Applied egg-rr87.6%
unpow187.6%
associate-*r*93.6%
*-commutative93.6%
Simplified93.6%
if -1.99999999999999991e68 < t < 1.99999999999999994e-28Initial program 85.5%
pow185.5%
associate-*l*88.9%
*-commutative88.9%
Applied egg-rr88.9%
unpow188.9%
associate-*l*96.3%
*-commutative96.3%
Simplified96.3%
Final simplification95.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* x 4.0) i))
(t_2 (* (* j 27.0) k))
(t_3 (* t (* a 4.0)))
(t_4 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) t_3) (* b c)) t_1) t_2)))
(if (<= t_4 2e+304)
t_4
(if (<= t_4 INFINITY)
(- (- (+ (* b c) (- (* y (* (* x 18.0) (* z t))) t_3)) t_1) t_2)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * 4.0) * i;
double t_2 = (j * 27.0) * k;
double t_3 = t * (a * 4.0);
double t_4 = (((((((x * 18.0) * y) * z) * t) - t_3) + (b * c)) - t_1) - t_2;
double tmp;
if (t_4 <= 2e+304) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - t_3)) - t_1) - t_2;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * 4.0) * i;
double t_2 = (j * 27.0) * k;
double t_3 = t * (a * 4.0);
double t_4 = (((((((x * 18.0) * y) * z) * t) - t_3) + (b * c)) - t_1) - t_2;
double tmp;
if (t_4 <= 2e+304) {
tmp = t_4;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - t_3)) - t_1) - t_2;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * 4.0) * i t_2 = (j * 27.0) * k t_3 = t * (a * 4.0) t_4 = (((((((x * 18.0) * y) * z) * t) - t_3) + (b * c)) - t_1) - t_2 tmp = 0 if t_4 <= 2e+304: tmp = t_4 elif t_4 <= math.inf: tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - t_3)) - t_1) - t_2 else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * 4.0) * i) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(t * Float64(a * 4.0)) t_4 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - t_3) + Float64(b * c)) - t_1) - t_2) tmp = 0.0 if (t_4 <= 2e+304) tmp = t_4; elseif (t_4 <= Inf) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(y * Float64(Float64(x * 18.0) * Float64(z * t))) - t_3)) - t_1) - t_2); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * 4.0) * i;
t_2 = (j * 27.0) * k;
t_3 = t * (a * 4.0);
t_4 = (((((((x * 18.0) * y) * z) * t) - t_3) + (b * c)) - t_1) - t_2;
tmp = 0.0;
if (t_4 <= 2e+304)
tmp = t_4;
elseif (t_4 <= Inf)
tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - t_3)) - t_1) - t_2;
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - t$95$3), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]}, If[LessEqual[t$95$4, 2e+304], t$95$4, If[LessEqual[t$95$4, Infinity], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 4\right) \cdot i\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := t \cdot \left(a \cdot 4\right)\\
t_4 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t\_3\right) + b \cdot c\right) - t\_1\right) - t\_2\\
\mathbf{if}\;t\_4 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\left(\left(b \cdot c + \left(y \cdot \left(\left(x \cdot 18\right) \cdot \left(z \cdot t\right)\right) - t\_3\right)\right) - t\_1\right) - t\_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < 1.9999999999999999e304Initial program 94.5%
if 1.9999999999999999e304 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 90.3%
pow190.3%
associate-*l*88.0%
*-commutative88.0%
Applied egg-rr88.0%
unpow188.0%
associate-*l*95.9%
*-commutative95.9%
Simplified95.9%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified26.7%
Taylor expanded in x around inf 76.7%
Final simplification92.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 (* (* z t) (* 18.0 (* x y))))
(t_2 (+ (* j (* k -27.0)) (* -4.0 (* t a)))))
(if (<= (* b c) -5e+135)
(* b (+ c (* -27.0 (* j (/ k b)))))
(if (<= (* b c) 5e-223)
t_2
(if (<= (* b c) 2e-172)
t_1
(if (<= (* b c) 0.004)
t_2
(if (<= (* b c) 5e+97)
t_1
(* c (+ b (* -27.0 (/ (* j k) c)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (z * t) * (18.0 * (x * y));
double t_2 = (j * (k * -27.0)) + (-4.0 * (t * a));
double tmp;
if ((b * c) <= -5e+135) {
tmp = b * (c + (-27.0 * (j * (k / b))));
} else if ((b * c) <= 5e-223) {
tmp = t_2;
} else if ((b * c) <= 2e-172) {
tmp = t_1;
} else if ((b * c) <= 0.004) {
tmp = t_2;
} else if ((b * c) <= 5e+97) {
tmp = t_1;
} else {
tmp = c * (b + (-27.0 * ((j * k) / c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z * t) * (18.0d0 * (x * y))
t_2 = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
if ((b * c) <= (-5d+135)) then
tmp = b * (c + ((-27.0d0) * (j * (k / b))))
else if ((b * c) <= 5d-223) then
tmp = t_2
else if ((b * c) <= 2d-172) then
tmp = t_1
else if ((b * c) <= 0.004d0) then
tmp = t_2
else if ((b * c) <= 5d+97) then
tmp = t_1
else
tmp = c * (b + ((-27.0d0) * ((j * k) / c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (z * t) * (18.0 * (x * y));
double t_2 = (j * (k * -27.0)) + (-4.0 * (t * a));
double tmp;
if ((b * c) <= -5e+135) {
tmp = b * (c + (-27.0 * (j * (k / b))));
} else if ((b * c) <= 5e-223) {
tmp = t_2;
} else if ((b * c) <= 2e-172) {
tmp = t_1;
} else if ((b * c) <= 0.004) {
tmp = t_2;
} else if ((b * c) <= 5e+97) {
tmp = t_1;
} else {
tmp = c * (b + (-27.0 * ((j * k) / c)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (z * t) * (18.0 * (x * y)) t_2 = (j * (k * -27.0)) + (-4.0 * (t * a)) tmp = 0 if (b * c) <= -5e+135: tmp = b * (c + (-27.0 * (j * (k / b)))) elif (b * c) <= 5e-223: tmp = t_2 elif (b * c) <= 2e-172: tmp = t_1 elif (b * c) <= 0.004: tmp = t_2 elif (b * c) <= 5e+97: tmp = t_1 else: tmp = c * (b + (-27.0 * ((j * k) / c))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(z * t) * Float64(18.0 * Float64(x * y))) t_2 = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (Float64(b * c) <= -5e+135) tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(j * Float64(k / b))))); elseif (Float64(b * c) <= 5e-223) tmp = t_2; elseif (Float64(b * c) <= 2e-172) tmp = t_1; elseif (Float64(b * c) <= 0.004) tmp = t_2; elseif (Float64(b * c) <= 5e+97) tmp = t_1; else tmp = Float64(c * Float64(b + Float64(-27.0 * Float64(Float64(j * k) / c)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (z * t) * (18.0 * (x * y));
t_2 = (j * (k * -27.0)) + (-4.0 * (t * a));
tmp = 0.0;
if ((b * c) <= -5e+135)
tmp = b * (c + (-27.0 * (j * (k / b))));
elseif ((b * c) <= 5e-223)
tmp = t_2;
elseif ((b * c) <= 2e-172)
tmp = t_1;
elseif ((b * c) <= 0.004)
tmp = t_2;
elseif ((b * c) <= 5e+97)
tmp = t_1;
else
tmp = c * (b + (-27.0 * ((j * k) / c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5e+135], N[(b * N[(c + N[(-27.0 * N[(j * N[(k / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e-223], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 2e-172], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 0.004], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 5e+97], t$95$1, N[(c * N[(b + N[(-27.0 * N[(N[(j * k), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(z \cdot t\right) \cdot \left(18 \cdot \left(x \cdot y\right)\right)\\
t_2 := j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+135}:\\
\;\;\;\;b \cdot \left(c + -27 \cdot \left(j \cdot \frac{k}{b}\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-223}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 0.004:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(b + -27 \cdot \frac{j \cdot k}{c}\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -5.00000000000000029e135Initial program 75.2%
pow175.2%
associate-*l*75.2%
*-commutative75.2%
Applied egg-rr75.2%
unpow175.2%
associate-*l*74.9%
*-commutative74.9%
Simplified74.9%
Taylor expanded in b around inf 63.9%
Taylor expanded in b around inf 66.4%
*-commutative66.4%
associate-/l*66.4%
Simplified66.4%
if -5.00000000000000029e135 < (*.f64 b c) < 5.00000000000000024e-223 or 2.0000000000000001e-172 < (*.f64 b c) < 0.0040000000000000001Initial program 83.5%
Simplified87.4%
Taylor expanded in a around inf 54.5%
*-commutative54.5%
Simplified54.5%
if 5.00000000000000024e-223 < (*.f64 b c) < 2.0000000000000001e-172 or 0.0040000000000000001 < (*.f64 b c) < 4.99999999999999999e97Initial program 85.1%
Simplified76.6%
Taylor expanded in y around inf 50.1%
associate-*r*49.8%
Simplified49.8%
Taylor expanded in t around 0 50.1%
associate-*r*61.5%
*-commutative61.5%
Simplified61.5%
Taylor expanded in t around inf 47.3%
*-commutative47.3%
associate-*r*55.7%
*-commutative55.7%
associate-*l*55.6%
associate-*l*55.5%
Simplified55.5%
if 4.99999999999999999e97 < (*.f64 b c) Initial program 85.3%
pow185.3%
associate-*l*82.5%
*-commutative82.5%
Applied egg-rr82.5%
unpow182.5%
associate-*l*79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in b around inf 82.8%
Taylor expanded in c around inf 85.6%
*-commutative85.6%
Simplified85.6%
Final simplification60.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 27.0 (* j k))))
(t_2 (* j (* k -27.0)))
(t_3 (+ t_2 (* i (* x -4.0)))))
(if (<= t -3.6e+198)
(* 18.0 (* t (* x (* y z))))
(if (<= t -2.2e-23)
(+ t_2 (* -4.0 (* t a)))
(if (<= t -5e-278)
t_1
(if (<= t 8e-186)
t_3
(if (<= t 3.5e-5)
t_1
(if (<= t 1.2e+138) t_3 (- (* b c) (* 4.0 (* t a)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (i * (x * -4.0));
double tmp;
if (t <= -3.6e+198) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (t <= -2.2e-23) {
tmp = t_2 + (-4.0 * (t * a));
} else if (t <= -5e-278) {
tmp = t_1;
} else if (t <= 8e-186) {
tmp = t_3;
} else if (t <= 3.5e-5) {
tmp = t_1;
} else if (t <= 1.2e+138) {
tmp = t_3;
} else {
tmp = (b * c) - (4.0 * (t * a));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (b * c) - (27.0d0 * (j * k))
t_2 = j * (k * (-27.0d0))
t_3 = t_2 + (i * (x * (-4.0d0)))
if (t <= (-3.6d+198)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (t <= (-2.2d-23)) then
tmp = t_2 + ((-4.0d0) * (t * a))
else if (t <= (-5d-278)) then
tmp = t_1
else if (t <= 8d-186) then
tmp = t_3
else if (t <= 3.5d-5) then
tmp = t_1
else if (t <= 1.2d+138) then
tmp = t_3
else
tmp = (b * c) - (4.0d0 * (t * a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (i * (x * -4.0));
double tmp;
if (t <= -3.6e+198) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (t <= -2.2e-23) {
tmp = t_2 + (-4.0 * (t * a));
} else if (t <= -5e-278) {
tmp = t_1;
} else if (t <= 8e-186) {
tmp = t_3;
} else if (t <= 3.5e-5) {
tmp = t_1;
} else if (t <= 1.2e+138) {
tmp = t_3;
} else {
tmp = (b * c) - (4.0 * (t * a));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (27.0 * (j * k)) t_2 = j * (k * -27.0) t_3 = t_2 + (i * (x * -4.0)) tmp = 0 if t <= -3.6e+198: tmp = 18.0 * (t * (x * (y * z))) elif t <= -2.2e-23: tmp = t_2 + (-4.0 * (t * a)) elif t <= -5e-278: tmp = t_1 elif t <= 8e-186: tmp = t_3 elif t <= 3.5e-5: tmp = t_1 elif t <= 1.2e+138: tmp = t_3 else: tmp = (b * c) - (4.0 * (t * a)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(t_2 + Float64(i * Float64(x * -4.0))) tmp = 0.0 if (t <= -3.6e+198) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (t <= -2.2e-23) tmp = Float64(t_2 + Float64(-4.0 * Float64(t * a))); elseif (t <= -5e-278) tmp = t_1; elseif (t <= 8e-186) tmp = t_3; elseif (t <= 3.5e-5) tmp = t_1; elseif (t <= 1.2e+138) tmp = t_3; else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (27.0 * (j * k));
t_2 = j * (k * -27.0);
t_3 = t_2 + (i * (x * -4.0));
tmp = 0.0;
if (t <= -3.6e+198)
tmp = 18.0 * (t * (x * (y * z)));
elseif (t <= -2.2e-23)
tmp = t_2 + (-4.0 * (t * a));
elseif (t <= -5e-278)
tmp = t_1;
elseif (t <= 8e-186)
tmp = t_3;
elseif (t <= 3.5e-5)
tmp = t_1;
elseif (t <= 1.2e+138)
tmp = t_3;
else
tmp = (b * c) - (4.0 * (t * a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.6e+198], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.2e-23], N[(t$95$2 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5e-278], t$95$1, If[LessEqual[t, 8e-186], t$95$3, If[LessEqual[t, 3.5e-5], t$95$1, If[LessEqual[t, 1.2e+138], t$95$3, N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t\_2 + i \cdot \left(x \cdot -4\right)\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{+198}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq -2.2 \cdot 10^{-23}:\\
\;\;\;\;t\_2 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-278}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-186}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+138}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if t < -3.6000000000000002e198Initial program 69.6%
Simplified78.3%
Taylor expanded in y around inf 70.4%
associate-*r*70.1%
Simplified70.1%
Taylor expanded in t around 0 70.4%
associate-*r*70.4%
*-commutative70.4%
Simplified70.4%
Taylor expanded in t around inf 66.6%
if -3.6000000000000002e198 < t < -2.1999999999999999e-23Initial program 74.5%
Simplified77.2%
Taylor expanded in a around inf 54.5%
*-commutative54.5%
Simplified54.5%
if -2.1999999999999999e-23 < t < -4.99999999999999985e-278 or 7.9999999999999993e-186 < t < 3.4999999999999997e-5Initial program 88.8%
Taylor expanded in t around 0 81.6%
Taylor expanded in i around 0 65.7%
if -4.99999999999999985e-278 < t < 7.9999999999999993e-186 or 3.4999999999999997e-5 < t < 1.2e138Initial program 84.6%
Simplified91.4%
Taylor expanded in i around inf 66.4%
associate-*r*66.4%
*-commutative66.4%
associate-*r*66.4%
*-commutative66.4%
*-commutative66.4%
Simplified66.4%
if 1.2e138 < t Initial program 81.5%
Taylor expanded in x around 0 65.8%
Taylor expanded in j around 0 65.8%
Final simplification64.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* j (* k -27.0)) (* -4.0 (* t a)))))
(if (<= x -4.6e+77)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= x -5.5e-56)
(- (* b c) (* 4.0 (* t a)))
(if (<= x -5e-201)
t_1
(if (<= x 1.7e-297)
(- (* b c) (* (* j 27.0) k))
(if (<= x 1.1e+52)
t_1
(* x (+ (* i -4.0) (* 18.0 (* z (* y t))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (-4.0 * (t * a));
double tmp;
if (x <= -4.6e+77) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= -5.5e-56) {
tmp = (b * c) - (4.0 * (t * a));
} else if (x <= -5e-201) {
tmp = t_1;
} else if (x <= 1.7e-297) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (x <= 1.1e+52) {
tmp = t_1;
} else {
tmp = x * ((i * -4.0) + (18.0 * (z * (y * t))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
if (x <= (-4.6d+77)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (x <= (-5.5d-56)) then
tmp = (b * c) - (4.0d0 * (t * a))
else if (x <= (-5d-201)) then
tmp = t_1
else if (x <= 1.7d-297) then
tmp = (b * c) - ((j * 27.0d0) * k)
else if (x <= 1.1d+52) then
tmp = t_1
else
tmp = x * ((i * (-4.0d0)) + (18.0d0 * (z * (y * t))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (-4.0 * (t * a));
double tmp;
if (x <= -4.6e+77) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= -5.5e-56) {
tmp = (b * c) - (4.0 * (t * a));
} else if (x <= -5e-201) {
tmp = t_1;
} else if (x <= 1.7e-297) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (x <= 1.1e+52) {
tmp = t_1;
} else {
tmp = x * ((i * -4.0) + (18.0 * (z * (y * t))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * (k * -27.0)) + (-4.0 * (t * a)) tmp = 0 if x <= -4.6e+77: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif x <= -5.5e-56: tmp = (b * c) - (4.0 * (t * a)) elif x <= -5e-201: tmp = t_1 elif x <= 1.7e-297: tmp = (b * c) - ((j * 27.0) * k) elif x <= 1.1e+52: tmp = t_1 else: tmp = x * ((i * -4.0) + (18.0 * (z * (y * t)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (x <= -4.6e+77) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (x <= -5.5e-56) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (x <= -5e-201) tmp = t_1; elseif (x <= 1.7e-297) tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k)); elseif (x <= 1.1e+52) tmp = t_1; else tmp = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(z * Float64(y * t))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * (k * -27.0)) + (-4.0 * (t * a));
tmp = 0.0;
if (x <= -4.6e+77)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (x <= -5.5e-56)
tmp = (b * c) - (4.0 * (t * a));
elseif (x <= -5e-201)
tmp = t_1;
elseif (x <= 1.7e-297)
tmp = (b * c) - ((j * 27.0) * k);
elseif (x <= 1.1e+52)
tmp = t_1;
else
tmp = x * ((i * -4.0) + (18.0 * (z * (y * t))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.6e+77], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.5e-56], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5e-201], t$95$1, If[LessEqual[x, 1.7e-297], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.1e+52], t$95$1, N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;x \leq -4.6 \cdot 10^{+77}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq -5.5 \cdot 10^{-56}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-201}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{-297}:\\
\;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if x < -4.5999999999999999e77Initial program 70.5%
Simplified83.9%
Taylor expanded in x around inf 75.0%
if -4.5999999999999999e77 < x < -5.4999999999999999e-56Initial program 86.6%
Taylor expanded in x around 0 67.5%
Taylor expanded in j around 0 61.4%
if -5.4999999999999999e-56 < x < -4.9999999999999999e-201 or 1.69999999999999991e-297 < x < 1.1e52Initial program 92.7%
Simplified91.1%
Taylor expanded in a around inf 65.1%
*-commutative65.1%
Simplified65.1%
if -4.9999999999999999e-201 < x < 1.69999999999999991e-297Initial program 95.1%
pow195.1%
associate-*l*81.1%
*-commutative81.1%
Applied egg-rr81.1%
unpow181.1%
associate-*l*81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in b around inf 74.6%
if 1.1e52 < x Initial program 63.0%
Simplified70.7%
pow170.7%
associate-*l*70.7%
associate-*r*70.7%
Applied egg-rr70.7%
unpow170.7%
*-commutative70.7%
Simplified70.7%
pow170.7%
associate-*r*70.7%
Applied egg-rr70.7%
unpow170.7%
associate-*r*68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in x around inf 68.3%
cancel-sign-sub-inv68.3%
metadata-eval68.3%
associate-*r*72.0%
Simplified72.0%
Final simplification68.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)) (* -4.0 (* t a))))
(t_2 (* x (+ (* i -4.0) (* 18.0 (* z (* y t)))))))
(if (<= x -4.6e+76)
t_2
(if (<= x -2.1e-58)
(- (* b c) (* 4.0 (* t a)))
(if (<= x -2.7e-201)
t_1
(if (<= x 7e-297)
(- (* b c) (* (* j 27.0) k))
(if (<= x 2.2e+53) t_1 t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (-4.0 * (t * a));
double t_2 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
double tmp;
if (x <= -4.6e+76) {
tmp = t_2;
} else if (x <= -2.1e-58) {
tmp = (b * c) - (4.0 * (t * a));
} else if (x <= -2.7e-201) {
tmp = t_1;
} else if (x <= 7e-297) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (x <= 2.2e+53) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
t_2 = x * ((i * (-4.0d0)) + (18.0d0 * (z * (y * t))))
if (x <= (-4.6d+76)) then
tmp = t_2
else if (x <= (-2.1d-58)) then
tmp = (b * c) - (4.0d0 * (t * a))
else if (x <= (-2.7d-201)) then
tmp = t_1
else if (x <= 7d-297) then
tmp = (b * c) - ((j * 27.0d0) * k)
else if (x <= 2.2d+53) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (-4.0 * (t * a));
double t_2 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
double tmp;
if (x <= -4.6e+76) {
tmp = t_2;
} else if (x <= -2.1e-58) {
tmp = (b * c) - (4.0 * (t * a));
} else if (x <= -2.7e-201) {
tmp = t_1;
} else if (x <= 7e-297) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (x <= 2.2e+53) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * (k * -27.0)) + (-4.0 * (t * a)) t_2 = x * ((i * -4.0) + (18.0 * (z * (y * t)))) tmp = 0 if x <= -4.6e+76: tmp = t_2 elif x <= -2.1e-58: tmp = (b * c) - (4.0 * (t * a)) elif x <= -2.7e-201: tmp = t_1 elif x <= 7e-297: tmp = (b * c) - ((j * 27.0) * k) elif x <= 2.2e+53: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))) t_2 = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(z * Float64(y * t))))) tmp = 0.0 if (x <= -4.6e+76) tmp = t_2; elseif (x <= -2.1e-58) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (x <= -2.7e-201) tmp = t_1; elseif (x <= 7e-297) tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k)); elseif (x <= 2.2e+53) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * (k * -27.0)) + (-4.0 * (t * a));
t_2 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
tmp = 0.0;
if (x <= -4.6e+76)
tmp = t_2;
elseif (x <= -2.1e-58)
tmp = (b * c) - (4.0 * (t * a));
elseif (x <= -2.7e-201)
tmp = t_1;
elseif (x <= 7e-297)
tmp = (b * c) - ((j * 27.0) * k);
elseif (x <= 2.2e+53)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.6e+76], t$95$2, If[LessEqual[x, -2.1e-58], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.7e-201], t$95$1, If[LessEqual[x, 7e-297], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e+53], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
t_2 := x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{if}\;x \leq -4.6 \cdot 10^{+76}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-58}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-201}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-297}:\\
\;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -4.60000000000000002e76 or 2.19999999999999999e53 < x Initial program 66.5%
Simplified76.8%
pow176.8%
associate-*l*76.8%
associate-*r*76.8%
Applied egg-rr76.8%
unpow176.8%
*-commutative76.8%
Simplified76.8%
pow176.8%
associate-*r*76.8%
Applied egg-rr76.8%
unpow176.8%
associate-*r*73.8%
*-commutative73.8%
Simplified73.8%
Taylor expanded in x around inf 71.4%
cancel-sign-sub-inv71.4%
metadata-eval71.4%
associate-*r*72.0%
Simplified72.0%
if -4.60000000000000002e76 < x < -2.09999999999999988e-58Initial program 86.6%
Taylor expanded in x around 0 67.5%
Taylor expanded in j around 0 61.4%
if -2.09999999999999988e-58 < x < -2.70000000000000005e-201 or 6.9999999999999998e-297 < x < 2.19999999999999999e53Initial program 92.7%
Simplified91.1%
Taylor expanded in a around inf 65.1%
*-commutative65.1%
Simplified65.1%
if -2.70000000000000005e-201 < x < 6.9999999999999998e-297Initial program 95.1%
pow195.1%
associate-*l*81.1%
*-commutative81.1%
Applied egg-rr81.1%
unpow181.1%
associate-*l*81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in b around inf 74.6%
Final simplification67.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* t a)))))
(if (<= t -6e+200)
(* 18.0 (* t (* x (* y z))))
(if (<= t -5.5e+100)
t_1
(if (<= t -2.4e-21)
(* (* z t) (* 18.0 (* x y)))
(if (<= t 1.85e+23)
(- (* b c) (* 27.0 (* j k)))
(if (<= t 1.05e+56) (* -4.0 (* x i)) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double tmp;
if (t <= -6e+200) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (t <= -5.5e+100) {
tmp = t_1;
} else if (t <= -2.4e-21) {
tmp = (z * t) * (18.0 * (x * y));
} else if (t <= 1.85e+23) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 1.05e+56) {
tmp = -4.0 * (x * i);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * (t * a))
if (t <= (-6d+200)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (t <= (-5.5d+100)) then
tmp = t_1
else if (t <= (-2.4d-21)) then
tmp = (z * t) * (18.0d0 * (x * y))
else if (t <= 1.85d+23) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (t <= 1.05d+56) then
tmp = (-4.0d0) * (x * i)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double tmp;
if (t <= -6e+200) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (t <= -5.5e+100) {
tmp = t_1;
} else if (t <= -2.4e-21) {
tmp = (z * t) * (18.0 * (x * y));
} else if (t <= 1.85e+23) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 1.05e+56) {
tmp = -4.0 * (x * i);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (t * a)) tmp = 0 if t <= -6e+200: tmp = 18.0 * (t * (x * (y * z))) elif t <= -5.5e+100: tmp = t_1 elif t <= -2.4e-21: tmp = (z * t) * (18.0 * (x * y)) elif t <= 1.85e+23: tmp = (b * c) - (27.0 * (j * k)) elif t <= 1.05e+56: tmp = -4.0 * (x * i) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) tmp = 0.0 if (t <= -6e+200) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (t <= -5.5e+100) tmp = t_1; elseif (t <= -2.4e-21) tmp = Float64(Float64(z * t) * Float64(18.0 * Float64(x * y))); elseif (t <= 1.85e+23) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (t <= 1.05e+56) tmp = Float64(-4.0 * Float64(x * i)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (t * a));
tmp = 0.0;
if (t <= -6e+200)
tmp = 18.0 * (t * (x * (y * z)));
elseif (t <= -5.5e+100)
tmp = t_1;
elseif (t <= -2.4e-21)
tmp = (z * t) * (18.0 * (x * y));
elseif (t <= 1.85e+23)
tmp = (b * c) - (27.0 * (j * k));
elseif (t <= 1.05e+56)
tmp = -4.0 * (x * i);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+200], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.5e+100], t$95$1, If[LessEqual[t, -2.4e-21], N[(N[(z * t), $MachinePrecision] * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+23], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+56], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t \leq -6 \cdot 10^{+200}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-21}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(18 \cdot \left(x \cdot y\right)\right)\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+23}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+56}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.99999999999999982e200Initial program 69.6%
Simplified78.3%
Taylor expanded in y around inf 70.4%
associate-*r*70.1%
Simplified70.1%
Taylor expanded in t around 0 70.4%
associate-*r*70.4%
*-commutative70.4%
Simplified70.4%
Taylor expanded in t around inf 66.6%
if -5.99999999999999982e200 < t < -5.5000000000000002e100 or 1.05000000000000009e56 < t Initial program 81.5%
Taylor expanded in x around 0 66.4%
Taylor expanded in j around 0 56.3%
if -5.5000000000000002e100 < t < -2.3999999999999999e-21Initial program 70.4%
Simplified65.8%
Taylor expanded in y around inf 61.3%
associate-*r*65.7%
Simplified65.7%
Taylor expanded in t around 0 61.3%
associate-*r*66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in t around inf 42.1%
*-commutative42.1%
associate-*r*46.8%
*-commutative46.8%
associate-*l*46.6%
associate-*l*46.5%
Simplified46.5%
if -2.3999999999999999e-21 < t < 1.85000000000000006e23Initial program 87.7%
Taylor expanded in t around 0 82.1%
Taylor expanded in i around 0 62.6%
if 1.85000000000000006e23 < t < 1.05000000000000009e56Initial program 80.0%
Simplified100.0%
pow1100.0%
associate-*l*100.0%
associate-*r*100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
Simplified100.0%
pow1100.0%
associate-*r*100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in i around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification60.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* t a)))))
(if (<= t -6.5e+198)
(* 18.0 (* t (* x (* y z))))
(if (<= t -9e+101)
t_1
(if (<= t -2.9e-23)
(* (* z t) (* 18.0 (* x y)))
(if (<= t 1.6e+23)
(+ (* b c) (* j (* k -27.0)))
(if (<= t 6.2e+55) (* -4.0 (* x i)) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double tmp;
if (t <= -6.5e+198) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (t <= -9e+101) {
tmp = t_1;
} else if (t <= -2.9e-23) {
tmp = (z * t) * (18.0 * (x * y));
} else if (t <= 1.6e+23) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 6.2e+55) {
tmp = -4.0 * (x * i);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * (t * a))
if (t <= (-6.5d+198)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (t <= (-9d+101)) then
tmp = t_1
else if (t <= (-2.9d-23)) then
tmp = (z * t) * (18.0d0 * (x * y))
else if (t <= 1.6d+23) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (t <= 6.2d+55) then
tmp = (-4.0d0) * (x * i)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double tmp;
if (t <= -6.5e+198) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (t <= -9e+101) {
tmp = t_1;
} else if (t <= -2.9e-23) {
tmp = (z * t) * (18.0 * (x * y));
} else if (t <= 1.6e+23) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 6.2e+55) {
tmp = -4.0 * (x * i);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (t * a)) tmp = 0 if t <= -6.5e+198: tmp = 18.0 * (t * (x * (y * z))) elif t <= -9e+101: tmp = t_1 elif t <= -2.9e-23: tmp = (z * t) * (18.0 * (x * y)) elif t <= 1.6e+23: tmp = (b * c) + (j * (k * -27.0)) elif t <= 6.2e+55: tmp = -4.0 * (x * i) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) tmp = 0.0 if (t <= -6.5e+198) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (t <= -9e+101) tmp = t_1; elseif (t <= -2.9e-23) tmp = Float64(Float64(z * t) * Float64(18.0 * Float64(x * y))); elseif (t <= 1.6e+23) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (t <= 6.2e+55) tmp = Float64(-4.0 * Float64(x * i)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (t * a));
tmp = 0.0;
if (t <= -6.5e+198)
tmp = 18.0 * (t * (x * (y * z)));
elseif (t <= -9e+101)
tmp = t_1;
elseif (t <= -2.9e-23)
tmp = (z * t) * (18.0 * (x * y));
elseif (t <= 1.6e+23)
tmp = (b * c) + (j * (k * -27.0));
elseif (t <= 6.2e+55)
tmp = -4.0 * (x * i);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e+198], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9e+101], t$95$1, If[LessEqual[t, -2.9e-23], N[(N[(z * t), $MachinePrecision] * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e+23], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e+55], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{+198}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq -9 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.9 \cdot 10^{-23}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(18 \cdot \left(x \cdot y\right)\right)\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+23}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+55}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.5000000000000003e198Initial program 69.6%
Simplified78.3%
Taylor expanded in y around inf 70.4%
associate-*r*70.1%
Simplified70.1%
Taylor expanded in t around 0 70.4%
associate-*r*70.4%
*-commutative70.4%
Simplified70.4%
Taylor expanded in t around inf 66.6%
if -6.5000000000000003e198 < t < -9.0000000000000004e101 or 6.19999999999999987e55 < t Initial program 81.5%
Taylor expanded in x around 0 66.4%
Taylor expanded in j around 0 56.3%
if -9.0000000000000004e101 < t < -2.9000000000000002e-23Initial program 70.4%
Simplified65.8%
Taylor expanded in y around inf 61.3%
associate-*r*65.7%
Simplified65.7%
Taylor expanded in t around 0 61.3%
associate-*r*66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in t around inf 42.1%
*-commutative42.1%
associate-*r*46.8%
*-commutative46.8%
associate-*l*46.6%
associate-*l*46.5%
Simplified46.5%
if -2.9000000000000002e-23 < t < 1.6e23Initial program 87.7%
Simplified87.7%
Taylor expanded in b around inf 62.6%
if 1.6e23 < t < 6.19999999999999987e55Initial program 80.0%
Simplified100.0%
pow1100.0%
associate-*l*100.0%
associate-*r*100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
Simplified100.0%
pow1100.0%
associate-*r*100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in i around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification60.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x 1.02e+173)
(-
(+ (* b c) (* t (- (* y (* x (* 18.0 z))) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(+ (* x (+ (* 18.0 (* t (* y z))) (* i -4.0))) (* j (* k -27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= 1.02e+173) {
tmp = ((b * c) + (t * ((y * (x * (18.0 * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (x * ((18.0 * (t * (y * z))) + (i * -4.0))) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= 1.02d+173) then
tmp = ((b * c) + (t * ((y * (x * (18.0d0 * z))) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = (x * ((18.0d0 * (t * (y * z))) + (i * (-4.0d0)))) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= 1.02e+173) {
tmp = ((b * c) + (t * ((y * (x * (18.0 * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (x * ((18.0 * (t * (y * z))) + (i * -4.0))) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= 1.02e+173: tmp = ((b * c) + (t * ((y * (x * (18.0 * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = (x * ((18.0 * (t * (y * z))) + (i * -4.0))) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= 1.02e+173) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(y * Float64(x * Float64(18.0 * z))) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) + Float64(i * -4.0))) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= 1.02e+173)
tmp = ((b * c) + (t * ((y * (x * (18.0 * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = (x * ((18.0 * (t * (y * z))) + (i * -4.0))) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, 1.02e+173], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(y * N[(x * N[(18.0 * z), $MachinePrecision]), $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[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.02 \cdot 10^{+173}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(y \cdot \left(x \cdot \left(18 \cdot z\right)\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + i \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if x < 1.02e173Initial program 86.9%
Simplified88.7%
pow188.7%
associate-*l*88.7%
associate-*r*88.3%
Applied egg-rr88.3%
unpow188.3%
*-commutative88.3%
Simplified88.3%
pow188.3%
associate-*r*88.7%
Applied egg-rr88.7%
unpow188.7%
associate-*r*91.2%
*-commutative91.2%
Simplified91.2%
if 1.02e173 < x Initial program 49.4%
Simplified66.1%
Taylor expanded in x around inf 83.5%
Final simplification90.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x 9.5e+174)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(+ (* x (+ (* 18.0 (* t (* y z))) (* i -4.0))) (* j (* k -27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= 9.5e+174) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (x * ((18.0 * (t * (y * z))) + (i * -4.0))) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= 9.5d+174) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = (x * ((18.0d0 * (t * (y * z))) + (i * (-4.0d0)))) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= 9.5e+174) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (x * ((18.0 * (t * (y * z))) + (i * -4.0))) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= 9.5e+174: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = (x * ((18.0 * (t * (y * z))) + (i * -4.0))) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= 9.5e+174) 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(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) + Float64(i * -4.0))) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= 9.5e+174)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = (x * ((18.0 * (t * (y * z))) + (i * -4.0))) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, 9.5e+174], 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[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 9.5 \cdot 10^{+174}:\\
\;\;\;\;\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}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + i \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if x < 9.4999999999999992e174Initial program 86.9%
Simplified88.7%
if 9.4999999999999992e174 < x Initial program 49.4%
Simplified66.1%
Taylor expanded in x around inf 83.5%
Final simplification88.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x 4.7e+176)
(-
(+ (* b c) (* t (- (* x (* z (* 18.0 y))) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(+ (* x (+ (* 18.0 (* t (* y z))) (* i -4.0))) (* j (* k -27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= 4.7e+176) {
tmp = ((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (x * ((18.0 * (t * (y * z))) + (i * -4.0))) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= 4.7d+176) then
tmp = ((b * c) + (t * ((x * (z * (18.0d0 * y))) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = (x * ((18.0d0 * (t * (y * z))) + (i * (-4.0d0)))) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= 4.7e+176) {
tmp = ((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (x * ((18.0 * (t * (y * z))) + (i * -4.0))) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= 4.7e+176: tmp = ((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = (x * ((18.0 * (t * (y * z))) + (i * -4.0))) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= 4.7e+176) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(x * Float64(z * Float64(18.0 * y))) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) + Float64(i * -4.0))) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= 4.7e+176)
tmp = ((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = (x * ((18.0 * (t * (y * z))) + (i * -4.0))) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, 4.7e+176], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $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[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.7 \cdot 10^{+176}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right)\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + i \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if x < 4.69999999999999981e176Initial program 86.9%
Simplified88.7%
pow188.7%
associate-*l*88.7%
associate-*r*88.3%
Applied egg-rr88.3%
unpow188.3%
*-commutative88.3%
Simplified88.3%
if 4.69999999999999981e176 < x Initial program 49.4%
Simplified66.1%
Taylor expanded in x around inf 83.5%
Final simplification87.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 (- (* b c) (* 27.0 (* j k))))
(t_2 (* t (+ (* a -4.0) (* 18.0 (* x (* y z)))))))
(if (<= t -6.2e-22)
t_2
(if (<= t -3e-280)
t_1
(if (<= t 1.6e-185)
(+ (* j (* k -27.0)) (* i (* x -4.0)))
(if (<= t 1.15e+23) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = t * ((a * -4.0) + (18.0 * (x * (y * z))));
double tmp;
if (t <= -6.2e-22) {
tmp = t_2;
} else if (t <= -3e-280) {
tmp = t_1;
} else if (t <= 1.6e-185) {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
} else if (t <= 1.15e+23) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (27.0d0 * (j * k))
t_2 = t * ((a * (-4.0d0)) + (18.0d0 * (x * (y * z))))
if (t <= (-6.2d-22)) then
tmp = t_2
else if (t <= (-3d-280)) then
tmp = t_1
else if (t <= 1.6d-185) then
tmp = (j * (k * (-27.0d0))) + (i * (x * (-4.0d0)))
else if (t <= 1.15d+23) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = t * ((a * -4.0) + (18.0 * (x * (y * z))));
double tmp;
if (t <= -6.2e-22) {
tmp = t_2;
} else if (t <= -3e-280) {
tmp = t_1;
} else if (t <= 1.6e-185) {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
} else if (t <= 1.15e+23) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (27.0 * (j * k)) t_2 = t * ((a * -4.0) + (18.0 * (x * (y * z)))) tmp = 0 if t <= -6.2e-22: tmp = t_2 elif t <= -3e-280: tmp = t_1 elif t <= 1.6e-185: tmp = (j * (k * -27.0)) + (i * (x * -4.0)) elif t <= 1.15e+23: 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(b * c) - Float64(27.0 * Float64(j * k))) t_2 = Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(x * Float64(y * z))))) tmp = 0.0 if (t <= -6.2e-22) tmp = t_2; elseif (t <= -3e-280) tmp = t_1; elseif (t <= 1.6e-185) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(i * Float64(x * -4.0))); elseif (t <= 1.15e+23) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (27.0 * (j * k));
t_2 = t * ((a * -4.0) + (18.0 * (x * (y * z))));
tmp = 0.0;
if (t <= -6.2e-22)
tmp = t_2;
elseif (t <= -3e-280)
tmp = t_1;
elseif (t <= 1.6e-185)
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
elseif (t <= 1.15e+23)
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[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e-22], t$95$2, If[LessEqual[t, -3e-280], t$95$1, If[LessEqual[t, 1.6e-185], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+23], 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 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \left(a \cdot -4 + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{-22}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-280}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-185}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -6.20000000000000025e-22 or 1.15e23 < t Initial program 77.6%
Simplified86.2%
Taylor expanded in t around inf 74.3%
Taylor expanded in t around inf 66.2%
if -6.20000000000000025e-22 < t < -2.99999999999999987e-280 or 1.5999999999999999e-185 < t < 1.15e23Initial program 89.2%
Taylor expanded in t around 0 81.4%
Taylor expanded in i around 0 65.1%
if -2.99999999999999987e-280 < t < 1.5999999999999999e-185Initial program 82.5%
Simplified82.5%
Taylor expanded in i around inf 72.1%
associate-*r*72.1%
*-commutative72.1%
associate-*r*72.1%
*-commutative72.1%
*-commutative72.1%
Simplified72.1%
Final simplification66.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* x (* y z)))) (t_2 (* 4.0 (* x i))))
(if (<= t -8.2e-23)
(+ (* t (+ (* a -4.0) t_1)) (* j (* k -27.0)))
(if (<= t 1.05e-42)
(- (- (* b c) t_2) (* (* j 27.0) k))
(- (+ (* b c) (* t (- t_1 (* a 4.0)))) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double t_2 = 4.0 * (x * i);
double tmp;
if (t <= -8.2e-23) {
tmp = (t * ((a * -4.0) + t_1)) + (j * (k * -27.0));
} else if (t <= 1.05e-42) {
tmp = ((b * c) - t_2) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
t_2 = 4.0d0 * (x * i)
if (t <= (-8.2d-23)) then
tmp = (t * ((a * (-4.0d0)) + t_1)) + (j * (k * (-27.0d0)))
else if (t <= 1.05d-42) then
tmp = ((b * c) - t_2) - ((j * 27.0d0) * k)
else
tmp = ((b * c) + (t * (t_1 - (a * 4.0d0)))) - t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double t_2 = 4.0 * (x * i);
double tmp;
if (t <= -8.2e-23) {
tmp = (t * ((a * -4.0) + t_1)) + (j * (k * -27.0));
} else if (t <= 1.05e-42) {
tmp = ((b * c) - t_2) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (x * (y * z)) t_2 = 4.0 * (x * i) tmp = 0 if t <= -8.2e-23: tmp = (t * ((a * -4.0) + t_1)) + (j * (k * -27.0)) elif t <= 1.05e-42: tmp = ((b * c) - t_2) - ((j * 27.0) * k) else: tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) t_2 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if (t <= -8.2e-23) tmp = Float64(Float64(t * Float64(Float64(a * -4.0) + t_1)) + Float64(j * Float64(k * -27.0))); elseif (t <= 1.05e-42) tmp = Float64(Float64(Float64(b * c) - t_2) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))) - t_2); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (x * (y * z));
t_2 = 4.0 * (x * i);
tmp = 0.0;
if (t <= -8.2e-23)
tmp = (t * ((a * -4.0) + t_1)) + (j * (k * -27.0));
elseif (t <= 1.05e-42)
tmp = ((b * c) - t_2) - ((j * 27.0) * k);
else
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.2e-23], N[(N[(t * N[(N[(a * -4.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-42], N[(N[(N[(b * c), $MachinePrecision] - t$95$2), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_2 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -8.2 \cdot 10^{-23}:\\
\;\;\;\;t \cdot \left(a \cdot -4 + t\_1\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-42}:\\
\;\;\;\;\left(b \cdot c - t\_2\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(t\_1 - a \cdot 4\right)\right) - t\_2\\
\end{array}
\end{array}
if t < -8.20000000000000059e-23Initial program 72.8%
Simplified77.6%
Taylor expanded in t around inf 73.5%
if -8.20000000000000059e-23 < t < 1.05000000000000003e-42Initial program 87.6%
Taylor expanded in t around 0 84.0%
if 1.05000000000000003e-42 < t Initial program 83.6%
Simplified93.2%
Taylor expanded in j around 0 85.5%
Final simplification81.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -9e-25) (not (<= t 2.05e+55))) (+ (* t (+ (* a -4.0) (* 18.0 (* x (* y z))))) (* j (* k -27.0))) (- (- (* b c) (* 4.0 (* x i))) (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -9e-25) || !(t <= 2.05e+55)) {
tmp = (t * ((a * -4.0) + (18.0 * (x * (y * z))))) + (j * (k * -27.0));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-9d-25)) .or. (.not. (t <= 2.05d+55))) then
tmp = (t * ((a * (-4.0d0)) + (18.0d0 * (x * (y * z))))) + (j * (k * (-27.0d0)))
else
tmp = ((b * c) - (4.0d0 * (x * i))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -9e-25) || !(t <= 2.05e+55)) {
tmp = (t * ((a * -4.0) + (18.0 * (x * (y * z))))) + (j * (k * -27.0));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -9e-25) or not (t <= 2.05e+55): tmp = (t * ((a * -4.0) + (18.0 * (x * (y * z))))) + (j * (k * -27.0)) else: tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -9e-25) || !(t <= 2.05e+55)) tmp = Float64(Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(x * Float64(y * z))))) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -9e-25) || ~((t <= 2.05e+55)))
tmp = (t * ((a * -4.0) + (18.0 * (x * (y * z))))) + (j * (k * -27.0));
else
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -9e-25], N[Not[LessEqual[t, 2.05e+55]], $MachinePrecision]], N[(N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $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 -9 \cdot 10^{-25} \lor \neg \left(t \leq 2.05 \cdot 10^{+55}\right):\\
\;\;\;\;t \cdot \left(a \cdot -4 + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -9.0000000000000002e-25 or 2.04999999999999991e55 < t Initial program 76.9%
Simplified85.7%
Taylor expanded in t around inf 75.8%
if -9.0000000000000002e-25 < t < 2.04999999999999991e55Initial program 88.1%
Taylor expanded in t around 0 82.6%
Final simplification79.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -1.4e+34)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= x 3.8e+80)
(- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))
(* x (+ (* i -4.0) (* 18.0 (* z (* y t))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.4e+34) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= 3.8e+80) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = x * ((i * -4.0) + (18.0 * (z * (y * t))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-1.4d+34)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (x <= 3.8d+80) then
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
else
tmp = x * ((i * (-4.0d0)) + (18.0d0 * (z * (y * t))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.4e+34) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= 3.8e+80) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = x * ((i * -4.0) + (18.0 * (z * (y * t))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -1.4e+34: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif x <= 3.8e+80: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) else: tmp = x * ((i * -4.0) + (18.0 * (z * (y * t)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -1.4e+34) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (x <= 3.8e+80) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(z * Float64(y * t))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -1.4e+34)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (x <= 3.8e+80)
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
else
tmp = x * ((i * -4.0) + (18.0 * (z * (y * t))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -1.4e+34], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e+80], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(z * N[(y * t), $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}\;x \leq -1.4 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+80}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.40000000000000004e34Initial program 70.2%
Simplified82.3%
Taylor expanded in x around inf 70.4%
if -1.40000000000000004e34 < x < 3.79999999999999997e80Initial program 94.1%
Taylor expanded in x around 0 76.9%
if 3.79999999999999997e80 < x Initial program 58.0%
Simplified66.7%
pow166.7%
associate-*l*66.7%
associate-*r*66.7%
Applied egg-rr66.7%
unpow166.7%
*-commutative66.7%
Simplified66.7%
pow166.7%
associate-*r*66.7%
Applied egg-rr66.7%
unpow166.7%
associate-*r*64.5%
*-commutative64.5%
Simplified64.5%
Taylor expanded in x around inf 70.7%
cancel-sign-sub-inv70.7%
metadata-eval70.7%
associate-*r*74.9%
Simplified74.9%
Final simplification75.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -3.9e-14)
(* 18.0 (* t (* x (* y z))))
(if (<= x -3.9e-56)
(* b c)
(if (<= x 1.35e+51) (* -27.0 (* j k)) (* (* z t) (* 18.0 (* x y)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -3.9e-14) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= -3.9e-56) {
tmp = b * c;
} else if (x <= 1.35e+51) {
tmp = -27.0 * (j * k);
} else {
tmp = (z * t) * (18.0 * (x * y));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-3.9d-14)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (x <= (-3.9d-56)) then
tmp = b * c
else if (x <= 1.35d+51) then
tmp = (-27.0d0) * (j * k)
else
tmp = (z * t) * (18.0d0 * (x * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -3.9e-14) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= -3.9e-56) {
tmp = b * c;
} else if (x <= 1.35e+51) {
tmp = -27.0 * (j * k);
} else {
tmp = (z * t) * (18.0 * (x * y));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -3.9e-14: tmp = 18.0 * (t * (x * (y * z))) elif x <= -3.9e-56: tmp = b * c elif x <= 1.35e+51: tmp = -27.0 * (j * k) else: tmp = (z * t) * (18.0 * (x * y)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -3.9e-14) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (x <= -3.9e-56) tmp = Float64(b * c); elseif (x <= 1.35e+51) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(Float64(z * t) * Float64(18.0 * Float64(x * y))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -3.9e-14)
tmp = 18.0 * (t * (x * (y * z)));
elseif (x <= -3.9e-56)
tmp = b * c;
elseif (x <= 1.35e+51)
tmp = -27.0 * (j * k);
else
tmp = (z * t) * (18.0 * (x * y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -3.9e-14], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.9e-56], N[(b * c), $MachinePrecision], If[LessEqual[x, 1.35e+51], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(N[(z * t), $MachinePrecision] * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{-14}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq -3.9 \cdot 10^{-56}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+51}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(18 \cdot \left(x \cdot y\right)\right)\\
\end{array}
\end{array}
if x < -3.8999999999999998e-14Initial program 74.7%
Simplified86.5%
Taylor expanded in y around inf 52.8%
associate-*r*54.2%
Simplified54.2%
Taylor expanded in t around 0 52.8%
associate-*r*51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in t around inf 42.4%
if -3.8999999999999998e-14 < x < -3.9e-56Initial program 100.0%
Simplified100.0%
pow1100.0%
associate-*l*100.0%
associate-*r*100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
Simplified100.0%
pow1100.0%
associate-*r*100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around inf 71.7%
if -3.9e-56 < x < 1.34999999999999996e51Initial program 93.1%
Simplified91.8%
Taylor expanded in j around inf 39.2%
if 1.34999999999999996e51 < x Initial program 63.0%
Simplified72.7%
Taylor expanded in y around inf 45.5%
associate-*r*51.1%
Simplified51.1%
Taylor expanded in t around 0 45.5%
associate-*r*47.6%
*-commutative47.6%
Simplified47.6%
Taylor expanded in t around inf 39.9%
*-commutative39.9%
associate-*r*41.9%
*-commutative41.9%
associate-*l*48.7%
associate-*l*48.7%
Simplified48.7%
Final simplification42.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* t (* x (* y z))))))
(if (<= x -2.35e-14)
t_1
(if (<= x -1.85e-56) (* b c) (if (<= x 1.5e+53) (* -27.0 (* j k)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (x * (y * z)));
double tmp;
if (x <= -2.35e-14) {
tmp = t_1;
} else if (x <= -1.85e-56) {
tmp = b * c;
} else if (x <= 1.5e+53) {
tmp = -27.0 * (j * k);
} 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 = 18.0d0 * (t * (x * (y * z)))
if (x <= (-2.35d-14)) then
tmp = t_1
else if (x <= (-1.85d-56)) then
tmp = b * c
else if (x <= 1.5d+53) then
tmp = (-27.0d0) * (j * k)
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 = 18.0 * (t * (x * (y * z)));
double tmp;
if (x <= -2.35e-14) {
tmp = t_1;
} else if (x <= -1.85e-56) {
tmp = b * c;
} else if (x <= 1.5e+53) {
tmp = -27.0 * (j * k);
} 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 = 18.0 * (t * (x * (y * z))) tmp = 0 if x <= -2.35e-14: tmp = t_1 elif x <= -1.85e-56: tmp = b * c elif x <= 1.5e+53: tmp = -27.0 * (j * k) 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(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (x <= -2.35e-14) tmp = t_1; elseif (x <= -1.85e-56) tmp = Float64(b * c); elseif (x <= 1.5e+53) tmp = Float64(-27.0 * Float64(j * k)); 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 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (x <= -2.35e-14)
tmp = t_1;
elseif (x <= -1.85e-56)
tmp = b * c;
elseif (x <= 1.5e+53)
tmp = -27.0 * (j * k);
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[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.35e-14], t$95$1, If[LessEqual[x, -1.85e-56], N[(b * c), $MachinePrecision], If[LessEqual[x, 1.5e+53], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -2.35 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.85 \cdot 10^{-56}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+53}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.3500000000000001e-14 or 1.49999999999999999e53 < x Initial program 69.6%
Simplified80.5%
Taylor expanded in y around inf 49.7%
associate-*r*52.9%
Simplified52.9%
Taylor expanded in t around 0 49.7%
associate-*r*49.8%
*-commutative49.8%
Simplified49.8%
Taylor expanded in t around inf 41.3%
if -2.3500000000000001e-14 < x < -1.8500000000000001e-56Initial program 100.0%
Simplified100.0%
pow1100.0%
associate-*l*100.0%
associate-*r*100.0%
Applied egg-rr100.0%
unpow1100.0%
*-commutative100.0%
Simplified100.0%
pow1100.0%
associate-*r*100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around inf 71.7%
if -1.8500000000000001e-56 < x < 1.49999999999999999e53Initial program 93.1%
Simplified91.8%
Taylor expanded in j around inf 39.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 (* t (* a -4.0))))
(if (<= a -1.35e+81)
t_1
(if (<= a -5.9e-192)
(* b c)
(if (<= a 1.15e+192) (* -27.0 (* j k)) 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 * (a * -4.0);
double tmp;
if (a <= -1.35e+81) {
tmp = t_1;
} else if (a <= -5.9e-192) {
tmp = b * c;
} else if (a <= 1.15e+192) {
tmp = -27.0 * (j * k);
} 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 = t * (a * (-4.0d0))
if (a <= (-1.35d+81)) then
tmp = t_1
else if (a <= (-5.9d-192)) then
tmp = b * c
else if (a <= 1.15d+192) then
tmp = (-27.0d0) * (j * k)
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 * (a * -4.0);
double tmp;
if (a <= -1.35e+81) {
tmp = t_1;
} else if (a <= -5.9e-192) {
tmp = b * c;
} else if (a <= 1.15e+192) {
tmp = -27.0 * (j * k);
} 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 * (a * -4.0) tmp = 0 if a <= -1.35e+81: tmp = t_1 elif a <= -5.9e-192: tmp = b * c elif a <= 1.15e+192: tmp = -27.0 * (j * k) 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(a * -4.0)) tmp = 0.0 if (a <= -1.35e+81) tmp = t_1; elseif (a <= -5.9e-192) tmp = Float64(b * c); elseif (a <= 1.15e+192) tmp = Float64(-27.0 * Float64(j * k)); 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 * (a * -4.0);
tmp = 0.0;
if (a <= -1.35e+81)
tmp = t_1;
elseif (a <= -5.9e-192)
tmp = b * c;
elseif (a <= 1.15e+192)
tmp = -27.0 * (j * k);
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[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.35e+81], t$95$1, If[LessEqual[a, -5.9e-192], N[(b * c), $MachinePrecision], If[LessEqual[a, 1.15e+192], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;a \leq -1.35 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -5.9 \cdot 10^{-192}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+192}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.35e81 or 1.15e192 < a Initial program 71.6%
Taylor expanded in x around 0 68.6%
Taylor expanded in a around inf 48.9%
metadata-eval48.9%
distribute-lft-neg-in48.9%
associate-*r*48.9%
*-commutative48.9%
distribute-rgt-neg-in48.9%
distribute-lft-neg-in48.9%
metadata-eval48.9%
*-commutative48.9%
Simplified48.9%
if -1.35e81 < a < -5.8999999999999997e-192Initial program 83.5%
Simplified83.6%
pow183.6%
associate-*l*83.6%
associate-*r*83.6%
Applied egg-rr83.6%
unpow183.6%
*-commutative83.6%
Simplified83.6%
pow183.6%
associate-*r*83.6%
Applied egg-rr83.6%
unpow183.6%
associate-*r*83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in b around inf 34.6%
if -5.8999999999999997e-192 < a < 1.15e192Initial program 88.2%
Simplified88.3%
Taylor expanded in j around inf 36.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 (* -4.0 (* x i))))
(if (<= x -1.15e+116)
t_1
(if (<= x -3e-56) (* b c) (if (<= x 1.2e+115) (* -27.0 (* j k)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if (x <= -1.15e+116) {
tmp = t_1;
} else if (x <= -3e-56) {
tmp = b * c;
} else if (x <= 1.2e+115) {
tmp = -27.0 * (j * k);
} 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 = (-4.0d0) * (x * i)
if (x <= (-1.15d+116)) then
tmp = t_1
else if (x <= (-3d-56)) then
tmp = b * c
else if (x <= 1.2d+115) then
tmp = (-27.0d0) * (j * k)
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 = -4.0 * (x * i);
double tmp;
if (x <= -1.15e+116) {
tmp = t_1;
} else if (x <= -3e-56) {
tmp = b * c;
} else if (x <= 1.2e+115) {
tmp = -27.0 * (j * k);
} 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 = -4.0 * (x * i) tmp = 0 if x <= -1.15e+116: tmp = t_1 elif x <= -3e-56: tmp = b * c elif x <= 1.2e+115: tmp = -27.0 * (j * k) 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(-4.0 * Float64(x * i)) tmp = 0.0 if (x <= -1.15e+116) tmp = t_1; elseif (x <= -3e-56) tmp = Float64(b * c); elseif (x <= 1.2e+115) tmp = Float64(-27.0 * Float64(j * k)); 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 = -4.0 * (x * i);
tmp = 0.0;
if (x <= -1.15e+116)
tmp = t_1;
elseif (x <= -3e-56)
tmp = b * c;
elseif (x <= 1.2e+115)
tmp = -27.0 * (j * k);
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[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.15e+116], t$95$1, If[LessEqual[x, -3e-56], N[(b * c), $MachinePrecision], If[LessEqual[x, 1.2e+115], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3 \cdot 10^{-56}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+115}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.14999999999999997e116 or 1.2e115 < x Initial program 62.7%
Simplified75.4%
pow175.4%
associate-*l*75.3%
associate-*r*75.4%
Applied egg-rr75.4%
unpow175.4%
*-commutative75.4%
Simplified75.4%
pow175.4%
associate-*r*75.4%
Applied egg-rr75.4%
unpow175.4%
associate-*r*71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in i around inf 43.3%
*-commutative43.3%
Simplified43.3%
if -1.14999999999999997e116 < x < -2.99999999999999989e-56Initial program 86.4%
Simplified89.1%
pow189.1%
associate-*l*89.1%
associate-*r*89.1%
Applied egg-rr89.1%
unpow189.1%
*-commutative89.1%
Simplified89.1%
pow189.1%
associate-*r*89.1%
Applied egg-rr89.1%
unpow189.1%
associate-*r*89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in b around inf 31.9%
if -2.99999999999999989e-56 < x < 1.2e115Initial program 92.3%
Simplified91.1%
Taylor expanded in j around inf 38.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 -4.2e+142)
(* 18.0 (* t (* x (* y z))))
(if (<= y 1.55e-15)
(+ (* b c) (* j (* k -27.0)))
(* (* z t) (* 18.0 (* x y))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -4.2e+142) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (y <= 1.55e-15) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = (z * t) * (18.0 * (x * y));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (y <= (-4.2d+142)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (y <= 1.55d-15) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = (z * t) * (18.0d0 * (x * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -4.2e+142) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (y <= 1.55e-15) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = (z * t) * (18.0 * (x * y));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if y <= -4.2e+142: tmp = 18.0 * (t * (x * (y * z))) elif y <= 1.55e-15: tmp = (b * c) + (j * (k * -27.0)) else: tmp = (z * t) * (18.0 * (x * y)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -4.2e+142) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (y <= 1.55e-15) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(z * t) * Float64(18.0 * Float64(x * y))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (y <= -4.2e+142)
tmp = 18.0 * (t * (x * (y * z)));
elseif (y <= 1.55e-15)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = (z * t) * (18.0 * (x * y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -4.2e+142], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-15], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * t), $MachinePrecision] * N[(18.0 * N[(x * y), $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 -4.2 \cdot 10^{+142}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-15}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(18 \cdot \left(x \cdot y\right)\right)\\
\end{array}
\end{array}
if y < -4.2e142Initial program 62.9%
Simplified72.6%
Taylor expanded in y around inf 55.6%
associate-*r*58.1%
Simplified58.1%
Taylor expanded in t around 0 55.6%
associate-*r*50.9%
*-commutative50.9%
Simplified50.9%
Taylor expanded in t around inf 48.6%
if -4.2e142 < y < 1.5499999999999999e-15Initial program 91.3%
Simplified94.6%
Taylor expanded in b around inf 53.6%
if 1.5499999999999999e-15 < y Initial program 74.6%
Simplified77.8%
Taylor expanded in y around inf 43.5%
associate-*r*46.3%
Simplified46.3%
Taylor expanded in t around 0 43.5%
associate-*r*52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in t around inf 31.2%
*-commutative31.2%
associate-*r*38.6%
*-commutative38.6%
associate-*l*39.3%
associate-*l*39.3%
Simplified39.3%
Final simplification49.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= k -7.5e-17) (not (<= k 1.85e+126))) (* -27.0 (* j k)) (* b c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -7.5e-17) || !(k <= 1.85e+126)) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((k <= (-7.5d-17)) .or. (.not. (k <= 1.85d+126))) then
tmp = (-27.0d0) * (j * k)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -7.5e-17) || !(k <= 1.85e+126)) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (k <= -7.5e-17) or not (k <= 1.85e+126): tmp = -27.0 * (j * k) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((k <= -7.5e-17) || !(k <= 1.85e+126)) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((k <= -7.5e-17) || ~((k <= 1.85e+126)))
tmp = -27.0 * (j * k);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[k, -7.5e-17], N[Not[LessEqual[k, 1.85e+126]], $MachinePrecision]], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -7.5 \cdot 10^{-17} \lor \neg \left(k \leq 1.85 \cdot 10^{+126}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if k < -7.49999999999999984e-17 or 1.8499999999999999e126 < k Initial program 84.5%
Simplified87.1%
Taylor expanded in j around inf 42.8%
if -7.49999999999999984e-17 < k < 1.8499999999999999e126Initial program 81.1%
Simplified86.1%
pow186.1%
associate-*l*86.1%
associate-*r*86.1%
Applied egg-rr86.1%
unpow186.1%
*-commutative86.1%
Simplified86.1%
pow186.1%
associate-*r*86.1%
Applied egg-rr86.1%
unpow186.1%
associate-*r*88.1%
*-commutative88.1%
Simplified88.1%
Taylor expanded in b around inf 27.0%
Final simplification34.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 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 82.6%
Simplified85.8%
pow185.8%
associate-*l*85.7%
associate-*r*85.4%
Applied egg-rr85.4%
unpow185.4%
*-commutative85.4%
Simplified85.4%
pow185.4%
associate-*r*85.8%
Applied egg-rr85.8%
unpow185.8%
associate-*r*87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in b around inf 21.0%
(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 2024106
(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)))