
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 95.7%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified33.3%
Taylor expanded in x around inf 85.5%
Final simplification94.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 (* -4.0 (+ (* t a) (* x i)))) (t_2 (- (* b c) (* 4.0 (* x i)))))
(if (<= c -42.0)
t_2
(if (<= c -5.8e-151)
t_1
(if (<= c -1.35e-177)
(* t (* (* y (* x z)) (- -18.0)))
(if (<= c 2.1e-171)
t_1
(if (<= c 3.4e-7)
(+ (* b c) (* j (* k -27.0)))
(if (<= c 1.75e+148) 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 = -4.0 * ((t * a) + (x * i));
double t_2 = (b * c) - (4.0 * (x * i));
double tmp;
if (c <= -42.0) {
tmp = t_2;
} else if (c <= -5.8e-151) {
tmp = t_1;
} else if (c <= -1.35e-177) {
tmp = t * ((y * (x * z)) * -(-18.0));
} else if (c <= 2.1e-171) {
tmp = t_1;
} else if (c <= 3.4e-7) {
tmp = (b * c) + (j * (k * -27.0));
} else if (c <= 1.75e+148) {
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 = (-4.0d0) * ((t * a) + (x * i))
t_2 = (b * c) - (4.0d0 * (x * i))
if (c <= (-42.0d0)) then
tmp = t_2
else if (c <= (-5.8d-151)) then
tmp = t_1
else if (c <= (-1.35d-177)) then
tmp = t * ((y * (x * z)) * -(-18.0d0))
else if (c <= 2.1d-171) then
tmp = t_1
else if (c <= 3.4d-7) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (c <= 1.75d+148) 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 = -4.0 * ((t * a) + (x * i));
double t_2 = (b * c) - (4.0 * (x * i));
double tmp;
if (c <= -42.0) {
tmp = t_2;
} else if (c <= -5.8e-151) {
tmp = t_1;
} else if (c <= -1.35e-177) {
tmp = t * ((y * (x * z)) * -(-18.0));
} else if (c <= 2.1e-171) {
tmp = t_1;
} else if (c <= 3.4e-7) {
tmp = (b * c) + (j * (k * -27.0));
} else if (c <= 1.75e+148) {
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 = -4.0 * ((t * a) + (x * i)) t_2 = (b * c) - (4.0 * (x * i)) tmp = 0 if c <= -42.0: tmp = t_2 elif c <= -5.8e-151: tmp = t_1 elif c <= -1.35e-177: tmp = t * ((y * (x * z)) * -(-18.0)) elif c <= 2.1e-171: tmp = t_1 elif c <= 3.4e-7: tmp = (b * c) + (j * (k * -27.0)) elif c <= 1.75e+148: 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(-4.0 * Float64(Float64(t * a) + Float64(x * i))) t_2 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (c <= -42.0) tmp = t_2; elseif (c <= -5.8e-151) tmp = t_1; elseif (c <= -1.35e-177) tmp = Float64(t * Float64(Float64(y * Float64(x * z)) * Float64(-(-18.0)))); elseif (c <= 2.1e-171) tmp = t_1; elseif (c <= 3.4e-7) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (c <= 1.75e+148) 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 = -4.0 * ((t * a) + (x * i));
t_2 = (b * c) - (4.0 * (x * i));
tmp = 0.0;
if (c <= -42.0)
tmp = t_2;
elseif (c <= -5.8e-151)
tmp = t_1;
elseif (c <= -1.35e-177)
tmp = t * ((y * (x * z)) * -(-18.0));
elseif (c <= 2.1e-171)
tmp = t_1;
elseif (c <= 3.4e-7)
tmp = (b * c) + (j * (k * -27.0));
elseif (c <= 1.75e+148)
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[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -42.0], t$95$2, If[LessEqual[c, -5.8e-151], t$95$1, If[LessEqual[c, -1.35e-177], N[(t * N[(N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision] * (--18.0)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.1e-171], t$95$1, If[LessEqual[c, 3.4e-7], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.75e+148], 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 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;c \leq -42:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -5.8 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.35 \cdot 10^{-177}:\\
\;\;\;\;t \cdot \left(\left(y \cdot \left(x \cdot z\right)\right) \cdot \left(--18\right)\right)\\
\mathbf{elif}\;c \leq 2.1 \cdot 10^{-171}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 3.4 \cdot 10^{-7}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;c \leq 1.75 \cdot 10^{+148}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if c < -42 or 1.7499999999999999e148 < c Initial program 82.7%
Simplified86.6%
associate-*r*85.7%
distribute-rgt-out--82.6%
associate-*l*83.6%
*-commutative83.6%
*-commutative83.6%
Applied egg-rr83.6%
Taylor expanded in y around 0 70.8%
Taylor expanded in j around 0 64.0%
distribute-lft-out64.0%
Simplified64.0%
Taylor expanded in a around 0 55.0%
if -42 < c < -5.80000000000000025e-151 or -1.3500000000000001e-177 < c < 2.1e-171 or 3.39999999999999974e-7 < c < 1.7499999999999999e148Initial program 87.5%
Simplified89.3%
associate-*r*90.0%
distribute-rgt-out--87.5%
associate-*l*85.8%
*-commutative85.8%
*-commutative85.8%
Applied egg-rr85.8%
Taylor expanded in y around 0 73.5%
Taylor expanded in j around 0 62.1%
distribute-lft-out62.1%
Simplified62.1%
Taylor expanded in b around 0 54.7%
if -5.80000000000000025e-151 < c < -1.3500000000000001e-177Initial program 100.0%
Taylor expanded in t around -inf 3.2%
Taylor expanded in x around inf 2.6%
pow12.6%
Applied egg-rr2.6%
unpow12.6%
*-commutative2.6%
associate-*l*26.7%
Simplified26.7%
if 2.1e-171 < c < 3.39999999999999974e-7Initial program 85.9%
Simplified86.6%
Taylor expanded in b around inf 52.5%
Final simplification54.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* t a) (* x i)))) (t_2 (- (* b c) (* 4.0 (* x i)))))
(if (<= c -62.0)
t_2
(if (<= c -4.7e-151)
t_1
(if (<= c -8.5e-178)
(* (* y (* x z)) (* t (- -18.0)))
(if (<= c 3.5e-172)
t_1
(if (<= c 7.5e-10)
(+ (* b c) (* j (* k -27.0)))
(if (<= c 4.3e+148) 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 = -4.0 * ((t * a) + (x * i));
double t_2 = (b * c) - (4.0 * (x * i));
double tmp;
if (c <= -62.0) {
tmp = t_2;
} else if (c <= -4.7e-151) {
tmp = t_1;
} else if (c <= -8.5e-178) {
tmp = (y * (x * z)) * (t * -(-18.0));
} else if (c <= 3.5e-172) {
tmp = t_1;
} else if (c <= 7.5e-10) {
tmp = (b * c) + (j * (k * -27.0));
} else if (c <= 4.3e+148) {
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 = (-4.0d0) * ((t * a) + (x * i))
t_2 = (b * c) - (4.0d0 * (x * i))
if (c <= (-62.0d0)) then
tmp = t_2
else if (c <= (-4.7d-151)) then
tmp = t_1
else if (c <= (-8.5d-178)) then
tmp = (y * (x * z)) * (t * -(-18.0d0))
else if (c <= 3.5d-172) then
tmp = t_1
else if (c <= 7.5d-10) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (c <= 4.3d+148) 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 = -4.0 * ((t * a) + (x * i));
double t_2 = (b * c) - (4.0 * (x * i));
double tmp;
if (c <= -62.0) {
tmp = t_2;
} else if (c <= -4.7e-151) {
tmp = t_1;
} else if (c <= -8.5e-178) {
tmp = (y * (x * z)) * (t * -(-18.0));
} else if (c <= 3.5e-172) {
tmp = t_1;
} else if (c <= 7.5e-10) {
tmp = (b * c) + (j * (k * -27.0));
} else if (c <= 4.3e+148) {
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 = -4.0 * ((t * a) + (x * i)) t_2 = (b * c) - (4.0 * (x * i)) tmp = 0 if c <= -62.0: tmp = t_2 elif c <= -4.7e-151: tmp = t_1 elif c <= -8.5e-178: tmp = (y * (x * z)) * (t * -(-18.0)) elif c <= 3.5e-172: tmp = t_1 elif c <= 7.5e-10: tmp = (b * c) + (j * (k * -27.0)) elif c <= 4.3e+148: 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(-4.0 * Float64(Float64(t * a) + Float64(x * i))) t_2 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (c <= -62.0) tmp = t_2; elseif (c <= -4.7e-151) tmp = t_1; elseif (c <= -8.5e-178) tmp = Float64(Float64(y * Float64(x * z)) * Float64(t * Float64(-(-18.0)))); elseif (c <= 3.5e-172) tmp = t_1; elseif (c <= 7.5e-10) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (c <= 4.3e+148) 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 = -4.0 * ((t * a) + (x * i));
t_2 = (b * c) - (4.0 * (x * i));
tmp = 0.0;
if (c <= -62.0)
tmp = t_2;
elseif (c <= -4.7e-151)
tmp = t_1;
elseif (c <= -8.5e-178)
tmp = (y * (x * z)) * (t * -(-18.0));
elseif (c <= 3.5e-172)
tmp = t_1;
elseif (c <= 7.5e-10)
tmp = (b * c) + (j * (k * -27.0));
elseif (c <= 4.3e+148)
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[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -62.0], t$95$2, If[LessEqual[c, -4.7e-151], t$95$1, If[LessEqual[c, -8.5e-178], N[(N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision] * N[(t * (--18.0)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.5e-172], t$95$1, If[LessEqual[c, 7.5e-10], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.3e+148], 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 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;c \leq -62:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -4.7 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -8.5 \cdot 10^{-178}:\\
\;\;\;\;\left(y \cdot \left(x \cdot z\right)\right) \cdot \left(t \cdot \left(--18\right)\right)\\
\mathbf{elif}\;c \leq 3.5 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 7.5 \cdot 10^{-10}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;c \leq 4.3 \cdot 10^{+148}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if c < -62 or 4.3000000000000002e148 < c Initial program 82.7%
Simplified86.6%
associate-*r*85.7%
distribute-rgt-out--82.6%
associate-*l*83.6%
*-commutative83.6%
*-commutative83.6%
Applied egg-rr83.6%
Taylor expanded in y around 0 70.8%
Taylor expanded in j around 0 64.0%
distribute-lft-out64.0%
Simplified64.0%
Taylor expanded in a around 0 55.0%
if -62 < c < -4.70000000000000029e-151 or -8.5000000000000001e-178 < c < 3.50000000000000029e-172 or 7.49999999999999995e-10 < c < 4.3000000000000002e148Initial program 87.5%
Simplified89.3%
associate-*r*90.0%
distribute-rgt-out--87.5%
associate-*l*85.8%
*-commutative85.8%
*-commutative85.8%
Applied egg-rr85.8%
Taylor expanded in y around 0 73.5%
Taylor expanded in j around 0 62.1%
distribute-lft-out62.1%
Simplified62.1%
Taylor expanded in b around 0 54.7%
if -4.70000000000000029e-151 < c < -8.5000000000000001e-178Initial program 100.0%
Taylor expanded in t around -inf 3.2%
Taylor expanded in x around inf 2.6%
*-commutative2.6%
*-commutative2.6%
associate-*l*2.6%
associate-*l*26.3%
*-commutative26.3%
Simplified26.3%
Taylor expanded in x around 0 2.6%
associate-*r*2.6%
*-commutative2.6%
associate-*l*26.7%
*-commutative26.7%
Simplified26.7%
if 3.50000000000000029e-172 < c < 7.49999999999999995e-10Initial program 85.9%
Simplified86.6%
Taylor expanded in b around inf 52.5%
Final simplification54.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* t a) (* x i)))) (t_2 (- (* b c) (* 4.0 (* x i)))))
(if (<= c -0.72)
t_2
(if (<= c -1.46e-151)
t_1
(if (<= c -1.4e-177)
(* (* y (* x z)) (* t (- -18.0)))
(if (<= c 1.9e-194)
t_1
(if (<= c 1.3e+16)
(+ (* -4.0 (* t a)) (* j (* k -27.0)))
(if (<= c 3.4e+148) 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 = -4.0 * ((t * a) + (x * i));
double t_2 = (b * c) - (4.0 * (x * i));
double tmp;
if (c <= -0.72) {
tmp = t_2;
} else if (c <= -1.46e-151) {
tmp = t_1;
} else if (c <= -1.4e-177) {
tmp = (y * (x * z)) * (t * -(-18.0));
} else if (c <= 1.9e-194) {
tmp = t_1;
} else if (c <= 1.3e+16) {
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
} else if (c <= 3.4e+148) {
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 = (-4.0d0) * ((t * a) + (x * i))
t_2 = (b * c) - (4.0d0 * (x * i))
if (c <= (-0.72d0)) then
tmp = t_2
else if (c <= (-1.46d-151)) then
tmp = t_1
else if (c <= (-1.4d-177)) then
tmp = (y * (x * z)) * (t * -(-18.0d0))
else if (c <= 1.9d-194) then
tmp = t_1
else if (c <= 1.3d+16) then
tmp = ((-4.0d0) * (t * a)) + (j * (k * (-27.0d0)))
else if (c <= 3.4d+148) 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 = -4.0 * ((t * a) + (x * i));
double t_2 = (b * c) - (4.0 * (x * i));
double tmp;
if (c <= -0.72) {
tmp = t_2;
} else if (c <= -1.46e-151) {
tmp = t_1;
} else if (c <= -1.4e-177) {
tmp = (y * (x * z)) * (t * -(-18.0));
} else if (c <= 1.9e-194) {
tmp = t_1;
} else if (c <= 1.3e+16) {
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
} else if (c <= 3.4e+148) {
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 = -4.0 * ((t * a) + (x * i)) t_2 = (b * c) - (4.0 * (x * i)) tmp = 0 if c <= -0.72: tmp = t_2 elif c <= -1.46e-151: tmp = t_1 elif c <= -1.4e-177: tmp = (y * (x * z)) * (t * -(-18.0)) elif c <= 1.9e-194: tmp = t_1 elif c <= 1.3e+16: tmp = (-4.0 * (t * a)) + (j * (k * -27.0)) elif c <= 3.4e+148: 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(-4.0 * Float64(Float64(t * a) + Float64(x * i))) t_2 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (c <= -0.72) tmp = t_2; elseif (c <= -1.46e-151) tmp = t_1; elseif (c <= -1.4e-177) tmp = Float64(Float64(y * Float64(x * z)) * Float64(t * Float64(-(-18.0)))); elseif (c <= 1.9e-194) tmp = t_1; elseif (c <= 1.3e+16) tmp = Float64(Float64(-4.0 * Float64(t * a)) + Float64(j * Float64(k * -27.0))); elseif (c <= 3.4e+148) 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 = -4.0 * ((t * a) + (x * i));
t_2 = (b * c) - (4.0 * (x * i));
tmp = 0.0;
if (c <= -0.72)
tmp = t_2;
elseif (c <= -1.46e-151)
tmp = t_1;
elseif (c <= -1.4e-177)
tmp = (y * (x * z)) * (t * -(-18.0));
elseif (c <= 1.9e-194)
tmp = t_1;
elseif (c <= 1.3e+16)
tmp = (-4.0 * (t * a)) + (j * (k * -27.0));
elseif (c <= 3.4e+148)
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[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -0.72], t$95$2, If[LessEqual[c, -1.46e-151], t$95$1, If[LessEqual[c, -1.4e-177], N[(N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision] * N[(t * (--18.0)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.9e-194], t$95$1, If[LessEqual[c, 1.3e+16], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.4e+148], 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 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;c \leq -0.72:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -1.46 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.4 \cdot 10^{-177}:\\
\;\;\;\;\left(y \cdot \left(x \cdot z\right)\right) \cdot \left(t \cdot \left(--18\right)\right)\\
\mathbf{elif}\;c \leq 1.9 \cdot 10^{-194}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.3 \cdot 10^{+16}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;c \leq 3.4 \cdot 10^{+148}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if c < -0.71999999999999997 or 3.4000000000000003e148 < c Initial program 82.7%
Simplified86.6%
associate-*r*85.7%
distribute-rgt-out--82.6%
associate-*l*83.6%
*-commutative83.6%
*-commutative83.6%
Applied egg-rr83.6%
Taylor expanded in y around 0 70.8%
Taylor expanded in j around 0 64.0%
distribute-lft-out64.0%
Simplified64.0%
Taylor expanded in a around 0 55.0%
if -0.71999999999999997 < c < -1.45999999999999996e-151 or -1.39999999999999993e-177 < c < 1.9000000000000001e-194 or 1.3e16 < c < 3.4000000000000003e148Initial program 88.0%
Simplified89.0%
associate-*r*90.6%
distribute-rgt-out--88.0%
associate-*l*86.3%
*-commutative86.3%
*-commutative86.3%
Applied egg-rr86.3%
Taylor expanded in y around 0 72.8%
Taylor expanded in j around 0 61.9%
distribute-lft-out61.9%
Simplified61.9%
Taylor expanded in b around 0 55.2%
if -1.45999999999999996e-151 < c < -1.39999999999999993e-177Initial program 100.0%
Taylor expanded in t around -inf 3.1%
Taylor expanded in x around inf 2.3%
*-commutative2.3%
*-commutative2.3%
associate-*l*2.3%
associate-*l*2.3%
*-commutative2.3%
Simplified2.3%
Taylor expanded in x around 0 2.3%
associate-*r*2.3%
*-commutative2.3%
associate-*l*2.3%
*-commutative2.3%
Simplified2.3%
if 1.9000000000000001e-194 < c < 1.3e16Initial program 84.9%
Simplified85.6%
Taylor expanded in a around inf 54.9%
*-commutative54.9%
Simplified54.9%
Final simplification54.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -5.1e+26)
t_2
(if (<= x -1.4e-190)
(+ (* b c) t_1)
(if (or (<= x 2.45e-129) (and (not (<= x 2.05e-97)) (<= x 2.9e-23)))
(+ (* -4.0 (* t a)) t_1)
t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -5.1e+26) {
tmp = t_2;
} else if (x <= -1.4e-190) {
tmp = (b * c) + t_1;
} else if ((x <= 2.45e-129) || (!(x <= 2.05e-97) && (x <= 2.9e-23))) {
tmp = (-4.0 * (t * a)) + t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-5.1d+26)) then
tmp = t_2
else if (x <= (-1.4d-190)) then
tmp = (b * c) + t_1
else if ((x <= 2.45d-129) .or. (.not. (x <= 2.05d-97)) .and. (x <= 2.9d-23)) then
tmp = ((-4.0d0) * (t * a)) + t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -5.1e+26) {
tmp = t_2;
} else if (x <= -1.4e-190) {
tmp = (b * c) + t_1;
} else if ((x <= 2.45e-129) || (!(x <= 2.05e-97) && (x <= 2.9e-23))) {
tmp = (-4.0 * (t * a)) + t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -5.1e+26: tmp = t_2 elif x <= -1.4e-190: tmp = (b * c) + t_1 elif (x <= 2.45e-129) or (not (x <= 2.05e-97) and (x <= 2.9e-23)): tmp = (-4.0 * (t * a)) + t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -5.1e+26) tmp = t_2; elseif (x <= -1.4e-190) tmp = Float64(Float64(b * c) + t_1); elseif ((x <= 2.45e-129) || (!(x <= 2.05e-97) && (x <= 2.9e-23))) tmp = Float64(Float64(-4.0 * Float64(t * a)) + t_1); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -5.1e+26)
tmp = t_2;
elseif (x <= -1.4e-190)
tmp = (b * c) + t_1;
elseif ((x <= 2.45e-129) || (~((x <= 2.05e-97)) && (x <= 2.9e-23)))
tmp = (-4.0 * (t * a)) + t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.1e+26], t$95$2, If[LessEqual[x, -1.4e-190], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[Or[LessEqual[x, 2.45e-129], And[N[Not[LessEqual[x, 2.05e-97]], $MachinePrecision], LessEqual[x, 2.9e-23]]], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -5.1 \cdot 10^{+26}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{-190}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;x \leq 2.45 \cdot 10^{-129} \lor \neg \left(x \leq 2.05 \cdot 10^{-97}\right) \land x \leq 2.9 \cdot 10^{-23}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -5.0999999999999997e26 or 2.45000000000000001e-129 < x < 2.04999999999999996e-97 or 2.9000000000000002e-23 < x Initial program 79.4%
Simplified86.9%
Taylor expanded in x around inf 74.6%
if -5.0999999999999997e26 < x < -1.40000000000000003e-190Initial program 93.1%
Simplified91.3%
Taylor expanded in b around inf 58.7%
if -1.40000000000000003e-190 < x < 2.45000000000000001e-129 or 2.04999999999999996e-97 < x < 2.9000000000000002e-23Initial program 94.0%
Simplified87.2%
Taylor expanded in a around inf 62.7%
*-commutative62.7%
Simplified62.7%
Final simplification68.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 (* -4.0 (+ (* t a) (* x i)))))
(if (<= (* b c) -6.8e+271)
(* b c)
(if (<= (* b c) 1.4e-44)
t_1
(if (<= (* b c) 6.5e-24)
(* (* j k) -27.0)
(if (<= (* b c) 9e+114) t_1 (* 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 t_1 = -4.0 * ((t * a) + (x * i));
double tmp;
if ((b * c) <= -6.8e+271) {
tmp = b * c;
} else if ((b * c) <= 1.4e-44) {
tmp = t_1;
} else if ((b * c) <= 6.5e-24) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 9e+114) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * ((t * a) + (x * i))
if ((b * c) <= (-6.8d+271)) then
tmp = b * c
else if ((b * c) <= 1.4d-44) then
tmp = t_1
else if ((b * c) <= 6.5d-24) then
tmp = (j * k) * (-27.0d0)
else if ((b * c) <= 9d+114) then
tmp = t_1
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 t_1 = -4.0 * ((t * a) + (x * i));
double tmp;
if ((b * c) <= -6.8e+271) {
tmp = b * c;
} else if ((b * c) <= 1.4e-44) {
tmp = t_1;
} else if ((b * c) <= 6.5e-24) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 9e+114) {
tmp = t_1;
} 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): t_1 = -4.0 * ((t * a) + (x * i)) tmp = 0 if (b * c) <= -6.8e+271: tmp = b * c elif (b * c) <= 1.4e-44: tmp = t_1 elif (b * c) <= 6.5e-24: tmp = (j * k) * -27.0 elif (b * c) <= 9e+114: tmp = t_1 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) t_1 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) tmp = 0.0 if (Float64(b * c) <= -6.8e+271) tmp = Float64(b * c); elseif (Float64(b * c) <= 1.4e-44) tmp = t_1; elseif (Float64(b * c) <= 6.5e-24) tmp = Float64(Float64(j * k) * -27.0); elseif (Float64(b * c) <= 9e+114) tmp = t_1; 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)
t_1 = -4.0 * ((t * a) + (x * i));
tmp = 0.0;
if ((b * c) <= -6.8e+271)
tmp = b * c;
elseif ((b * c) <= 1.4e-44)
tmp = t_1;
elseif ((b * c) <= 6.5e-24)
tmp = (j * k) * -27.0;
elseif ((b * c) <= 9e+114)
tmp = t_1;
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_] := Block[{t$95$1 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.8e+271], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.4e-44], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 6.5e-24], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9e+114], t$95$1, 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}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -6.8 \cdot 10^{+271}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 1.4 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 6.5 \cdot 10^{-24}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;b \cdot c \leq 9 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -6.80000000000000051e271 or 9.0000000000000001e114 < (*.f64 b c) Initial program 76.0%
Simplified79.1%
associate-*r*77.6%
distribute-rgt-out--74.4%
associate-*l*75.9%
*-commutative75.9%
*-commutative75.9%
Applied egg-rr75.9%
Taylor expanded in b around inf 63.9%
if -6.80000000000000051e271 < (*.f64 b c) < 1.4e-44 or 6.5e-24 < (*.f64 b c) < 9.0000000000000001e114Initial program 88.3%
Simplified89.5%
associate-*r*90.9%
distribute-rgt-out--88.8%
associate-*l*87.2%
*-commutative87.2%
*-commutative87.2%
Applied egg-rr87.2%
Taylor expanded in y around 0 72.6%
Taylor expanded in j around 0 56.6%
distribute-lft-out56.6%
Simplified56.6%
Taylor expanded in b around 0 50.4%
if 1.4e-44 < (*.f64 b c) < 6.5e-24Initial program 99.6%
Simplified100.0%
Taylor expanded in j around inf 70.2%
Final simplification54.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* t a) (* x i)))) (t_2 (- (* b c) (* 4.0 (* x i)))))
(if (<= c -0.215)
t_2
(if (<= c -5e-152)
t_1
(if (<= c -3.1e-177)
(* (* y (* x z)) (* t (- -18.0)))
(if (<= c 1.35e-171)
t_1
(if (<= c 5.3e+131)
(+ (* j (* k -27.0)) (* x (* i -4.0)))
t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((t * a) + (x * i));
double t_2 = (b * c) - (4.0 * (x * i));
double tmp;
if (c <= -0.215) {
tmp = t_2;
} else if (c <= -5e-152) {
tmp = t_1;
} else if (c <= -3.1e-177) {
tmp = (y * (x * z)) * (t * -(-18.0));
} else if (c <= 1.35e-171) {
tmp = t_1;
} else if (c <= 5.3e+131) {
tmp = (j * (k * -27.0)) + (x * (i * -4.0));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * ((t * a) + (x * i))
t_2 = (b * c) - (4.0d0 * (x * i))
if (c <= (-0.215d0)) then
tmp = t_2
else if (c <= (-5d-152)) then
tmp = t_1
else if (c <= (-3.1d-177)) then
tmp = (y * (x * z)) * (t * -(-18.0d0))
else if (c <= 1.35d-171) then
tmp = t_1
else if (c <= 5.3d+131) then
tmp = (j * (k * (-27.0d0))) + (x * (i * (-4.0d0)))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((t * a) + (x * i));
double t_2 = (b * c) - (4.0 * (x * i));
double tmp;
if (c <= -0.215) {
tmp = t_2;
} else if (c <= -5e-152) {
tmp = t_1;
} else if (c <= -3.1e-177) {
tmp = (y * (x * z)) * (t * -(-18.0));
} else if (c <= 1.35e-171) {
tmp = t_1;
} else if (c <= 5.3e+131) {
tmp = (j * (k * -27.0)) + (x * (i * -4.0));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((t * a) + (x * i)) t_2 = (b * c) - (4.0 * (x * i)) tmp = 0 if c <= -0.215: tmp = t_2 elif c <= -5e-152: tmp = t_1 elif c <= -3.1e-177: tmp = (y * (x * z)) * (t * -(-18.0)) elif c <= 1.35e-171: tmp = t_1 elif c <= 5.3e+131: tmp = (j * (k * -27.0)) + (x * (i * -4.0)) else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) t_2 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (c <= -0.215) tmp = t_2; elseif (c <= -5e-152) tmp = t_1; elseif (c <= -3.1e-177) tmp = Float64(Float64(y * Float64(x * z)) * Float64(t * Float64(-(-18.0)))); elseif (c <= 1.35e-171) tmp = t_1; elseif (c <= 5.3e+131) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(x * Float64(i * -4.0))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * ((t * a) + (x * i));
t_2 = (b * c) - (4.0 * (x * i));
tmp = 0.0;
if (c <= -0.215)
tmp = t_2;
elseif (c <= -5e-152)
tmp = t_1;
elseif (c <= -3.1e-177)
tmp = (y * (x * z)) * (t * -(-18.0));
elseif (c <= 1.35e-171)
tmp = t_1;
elseif (c <= 5.3e+131)
tmp = (j * (k * -27.0)) + (x * (i * -4.0));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -0.215], t$95$2, If[LessEqual[c, -5e-152], t$95$1, If[LessEqual[c, -3.1e-177], N[(N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision] * N[(t * (--18.0)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.35e-171], t$95$1, If[LessEqual[c, 5.3e+131], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;c \leq -0.215:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -5 \cdot 10^{-152}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -3.1 \cdot 10^{-177}:\\
\;\;\;\;\left(y \cdot \left(x \cdot z\right)\right) \cdot \left(t \cdot \left(--18\right)\right)\\
\mathbf{elif}\;c \leq 1.35 \cdot 10^{-171}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 5.3 \cdot 10^{+131}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if c < -0.214999999999999997 or 5.2999999999999997e131 < c Initial program 82.4%
Simplified86.2%
associate-*r*85.2%
distribute-rgt-out--82.3%
associate-*l*82.3%
*-commutative82.3%
*-commutative82.3%
Applied egg-rr82.3%
Taylor expanded in y around 0 70.0%
Taylor expanded in j around 0 64.5%
distribute-lft-out64.5%
Simplified64.5%
Taylor expanded in a around 0 54.8%
if -0.214999999999999997 < c < -4.9999999999999997e-152 or -3.10000000000000018e-177 < c < 1.35000000000000007e-171Initial program 87.0%
Simplified88.3%
associate-*r*90.3%
distribute-rgt-out--87.0%
associate-*l*84.9%
*-commutative84.9%
*-commutative84.9%
Applied egg-rr84.9%
Taylor expanded in y around 0 72.1%
Taylor expanded in j around 0 60.3%
distribute-lft-out60.3%
Simplified60.3%
Taylor expanded in b around 0 55.1%
if -4.9999999999999997e-152 < c < -3.10000000000000018e-177Initial program 100.0%
Taylor expanded in t around -inf 3.1%
Taylor expanded in x around inf 2.3%
*-commutative2.3%
*-commutative2.3%
associate-*l*2.3%
associate-*l*2.3%
*-commutative2.3%
Simplified2.3%
Taylor expanded in x around 0 2.3%
associate-*r*2.3%
*-commutative2.3%
associate-*l*2.3%
*-commutative2.3%
Simplified2.3%
if 1.35000000000000007e-171 < c < 5.2999999999999997e131Initial program 88.3%
Simplified88.8%
Taylor expanded in i around inf 55.1%
associate-*r*55.1%
*-commutative55.1%
Simplified55.1%
Final simplification54.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* x (* 4.0 i)) (* j (* 27.0 k)))))
(if (<= z 1.95e+193)
(- (+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0)))) t_1)
(- (+ (* b c) (- (* (* (* x 18.0) y) (* z t)) (* t (* a 4.0)))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if (z <= 1.95e+193) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + ((((x * 18.0) * y) * (z * t)) - (t * (a * 4.0)))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (x * (4.0d0 * i)) + (j * (27.0d0 * k))
if (z <= 1.95d+193) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - t_1
else
tmp = ((b * c) + ((((x * 18.0d0) * y) * (z * t)) - (t * (a * 4.0d0)))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if (z <= 1.95e+193) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + ((((x * 18.0) * y) * (z * t)) - (t * (a * 4.0)))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * (4.0 * i)) + (j * (27.0 * k)) tmp = 0 if z <= 1.95e+193: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1 else: tmp = ((b * c) + ((((x * 18.0) * y) * (z * t)) - (t * (a * 4.0)))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))) tmp = 0.0 if (z <= 1.95e+193) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(b * c) + Float64(Float64(Float64(Float64(x * 18.0) * y) * Float64(z * t)) - Float64(t * Float64(a * 4.0)))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
tmp = 0.0;
if (z <= 1.95e+193)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
else
tmp = ((b * c) + ((((x * 18.0) * y) * (z * t)) - (t * (a * 4.0)))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 1.95e+193], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;z \leq 1.95 \cdot 10^{+193}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot \left(z \cdot t\right) - t \cdot \left(a \cdot 4\right)\right)\right) - t\_1\\
\end{array}
\end{array}
if z < 1.95e193Initial program 86.2%
Simplified89.2%
if 1.95e193 < z Initial program 80.9%
Simplified70.2%
associate-*r*80.9%
distribute-rgt-out--80.9%
associate-*l*80.7%
*-commutative80.7%
*-commutative80.7%
Applied egg-rr80.7%
Final simplification88.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= z -660000000.0)
(not (or (<= z 1.32e+31) (and (not (<= z 3.15e+193)) (<= z 7e+229)))))
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(- (* b c) (* 4.0 (+ (* t a) (* x i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((z <= -660000000.0) || !((z <= 1.32e+31) || (!(z <= 3.15e+193) && (z <= 7e+229)))) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((z <= (-660000000.0d0)) .or. (.not. (z <= 1.32d+31) .or. (.not. (z <= 3.15d+193)) .and. (z <= 7d+229))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = (b * c) - (4.0d0 * ((t * a) + (x * i)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((z <= -660000000.0) || !((z <= 1.32e+31) || (!(z <= 3.15e+193) && (z <= 7e+229)))) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (z <= -660000000.0) or not ((z <= 1.32e+31) or (not (z <= 3.15e+193) and (z <= 7e+229))): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = (b * c) - (4.0 * ((t * a) + (x * i))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((z <= -660000000.0) || !((z <= 1.32e+31) || (!(z <= 3.15e+193) && (z <= 7e+229)))) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((z <= -660000000.0) || ~(((z <= 1.32e+31) || (~((z <= 3.15e+193)) && (z <= 7e+229)))))
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[z, -660000000.0], N[Not[Or[LessEqual[z, 1.32e+31], And[N[Not[LessEqual[z, 3.15e+193]], $MachinePrecision], LessEqual[z, 7e+229]]]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $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}\;z \leq -660000000 \lor \neg \left(z \leq 1.32 \cdot 10^{+31} \lor \neg \left(z \leq 3.15 \cdot 10^{+193}\right) \land z \leq 7 \cdot 10^{+229}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if z < -6.6e8 or 1.32000000000000011e31 < z < 3.15e193 or 7.0000000000000005e229 < z Initial program 82.8%
Simplified79.9%
Taylor expanded in x around inf 63.9%
if -6.6e8 < z < 1.32000000000000011e31 or 3.15e193 < z < 7.0000000000000005e229Initial program 88.0%
Simplified93.6%
associate-*r*90.0%
distribute-rgt-out--88.6%
associate-*l*88.6%
*-commutative88.6%
*-commutative88.6%
Applied egg-rr88.6%
Taylor expanded in y around 0 85.8%
Taylor expanded in j around 0 69.1%
distribute-lft-out69.1%
Simplified69.1%
Final simplification66.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 4.0 (* x i))))
(if (<= z -17000000000000.0)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= z 1.36e+20)
(- (+ (* b c) (* -4.0 (* t a))) (+ t_1 (* 27.0 (* j k))))
(- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double tmp;
if (z <= -17000000000000.0) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (z <= 1.36e+20) {
tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (27.0 * (j * k)));
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
if (z <= (-17000000000000.0d0)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (z <= 1.36d+20) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (t_1 + (27.0d0 * (j * k)))
else
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double tmp;
if (z <= -17000000000000.0) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (z <= 1.36e+20) {
tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (27.0 * (j * k)));
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) tmp = 0 if z <= -17000000000000.0: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif z <= 1.36e+20: tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (27.0 * (j * k))) else: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if (z <= -17000000000000.0) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (z <= 1.36e+20) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(t_1 + Float64(27.0 * Float64(j * k)))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
tmp = 0.0;
if (z <= -17000000000000.0)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (z <= 1.36e+20)
tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (27.0 * (j * k)));
else
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -17000000000000.0], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.36e+20], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\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}\;z \leq -17000000000000:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;z \leq 1.36 \cdot 10^{+20}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(t\_1 + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t\_1\\
\end{array}
\end{array}
if z < -1.7e13Initial program 80.5%
Simplified77.9%
Taylor expanded in x around inf 58.4%
if -1.7e13 < z < 1.36e20Initial program 89.6%
Simplified96.2%
Taylor expanded in y around 0 87.3%
if 1.36e20 < z Initial program 82.6%
Simplified77.8%
Taylor expanded in j around 0 79.6%
Final simplification78.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 (<= x -1e+98)
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
(if (<= x 1.6e+55)
(- (+ (* b c) (* -4.0 (* t a))) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
(* 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 tmp;
if (x <= -1e+98) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (x <= 1.6e+55) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-1d+98)) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
else if (x <= 1.6d+55) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
else
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1e+98) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (x <= 1.6e+55) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} 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): tmp = 0 if x <= -1e+98: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) elif x <= 1.6e+55: tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k))) 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) tmp = 0.0 if (x <= -1e+98) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); elseif (x <= 1.6e+55) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); else tmp = Float64(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)
tmp = 0.0;
if (x <= -1e+98)
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
elseif (x <= 1.6e+55)
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
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_] := If[LessEqual[x, -1e+98], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+55], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(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}
\mathbf{if}\;x \leq -1 \cdot 10^{+98}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+55}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -9.99999999999999998e97Initial program 74.5%
Simplified83.0%
associate-*r*78.7%
distribute-rgt-out--74.5%
associate-*l*72.3%
*-commutative72.3%
*-commutative72.3%
Applied egg-rr72.3%
Taylor expanded in x around inf 81.0%
cancel-sign-sub-inv81.0%
metadata-eval81.0%
*-commutative81.0%
associate-*r*80.6%
Simplified80.6%
if -9.99999999999999998e97 < x < 1.6000000000000001e55Initial program 92.4%
Simplified89.2%
Taylor expanded in y around 0 85.1%
if 1.6000000000000001e55 < x Initial program 78.7%
Simplified86.2%
Taylor expanded in x around inf 76.5%
Final simplification82.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= c -0.22)
(* b c)
(if (or (<= c 3.3e-172) (and (not (<= c 8.5e-13)) (<= c 1.4e+149)))
(* -4.0 (+ (* t a) (* x i)))
(+ (* b c) (* j (* k -27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -0.22) {
tmp = b * c;
} else if ((c <= 3.3e-172) || (!(c <= 8.5e-13) && (c <= 1.4e+149))) {
tmp = -4.0 * ((t * a) + (x * i));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (c <= (-0.22d0)) then
tmp = b * c
else if ((c <= 3.3d-172) .or. (.not. (c <= 8.5d-13)) .and. (c <= 1.4d+149)) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -0.22) {
tmp = b * c;
} else if ((c <= 3.3e-172) || (!(c <= 8.5e-13) && (c <= 1.4e+149))) {
tmp = -4.0 * ((t * a) + (x * i));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if c <= -0.22: tmp = b * c elif (c <= 3.3e-172) or (not (c <= 8.5e-13) and (c <= 1.4e+149)): tmp = -4.0 * ((t * a) + (x * i)) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (c <= -0.22) tmp = Float64(b * c); elseif ((c <= 3.3e-172) || (!(c <= 8.5e-13) && (c <= 1.4e+149))) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (c <= -0.22)
tmp = b * c;
elseif ((c <= 3.3e-172) || (~((c <= 8.5e-13)) && (c <= 1.4e+149)))
tmp = -4.0 * ((t * a) + (x * i));
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[c, -0.22], N[(b * c), $MachinePrecision], If[Or[LessEqual[c, 3.3e-172], And[N[Not[LessEqual[c, 8.5e-13]], $MachinePrecision], LessEqual[c, 1.4e+149]]], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -0.22:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 3.3 \cdot 10^{-172} \lor \neg \left(c \leq 8.5 \cdot 10^{-13}\right) \land c \leq 1.4 \cdot 10^{+149}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if c < -0.220000000000000001Initial program 79.8%
Simplified85.4%
associate-*r*84.0%
distribute-rgt-out--79.7%
associate-*l*81.1%
*-commutative81.1%
*-commutative81.1%
Applied egg-rr81.1%
Taylor expanded in b around inf 39.1%
if -0.220000000000000001 < c < 3.3e-172 or 8.5000000000000001e-13 < c < 1.4e149Initial program 87.9%
Simplified88.8%
associate-*r*90.3%
distribute-rgt-out--87.9%
associate-*l*86.3%
*-commutative86.3%
*-commutative86.3%
Applied egg-rr86.3%
Taylor expanded in y around 0 73.6%
Taylor expanded in j around 0 61.7%
distribute-lft-out61.7%
Simplified61.7%
Taylor expanded in b around 0 53.8%
if 3.3e-172 < c < 8.5000000000000001e-13 or 1.4e149 < c Initial program 87.6%
Simplified88.0%
Taylor expanded in b around inf 50.8%
Final simplification49.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* t a) (* x i)))) (t_2 (- (* b c) (* 4.0 (* x i)))))
(if (<= c -1.7e-13)
t_2
(if (<= c 9e-172)
t_1
(if (<= c 2.4e-12)
(+ (* b c) (* j (* k -27.0)))
(if (<= c 7.8e+148) 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 = -4.0 * ((t * a) + (x * i));
double t_2 = (b * c) - (4.0 * (x * i));
double tmp;
if (c <= -1.7e-13) {
tmp = t_2;
} else if (c <= 9e-172) {
tmp = t_1;
} else if (c <= 2.4e-12) {
tmp = (b * c) + (j * (k * -27.0));
} else if (c <= 7.8e+148) {
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 = (-4.0d0) * ((t * a) + (x * i))
t_2 = (b * c) - (4.0d0 * (x * i))
if (c <= (-1.7d-13)) then
tmp = t_2
else if (c <= 9d-172) then
tmp = t_1
else if (c <= 2.4d-12) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (c <= 7.8d+148) 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 = -4.0 * ((t * a) + (x * i));
double t_2 = (b * c) - (4.0 * (x * i));
double tmp;
if (c <= -1.7e-13) {
tmp = t_2;
} else if (c <= 9e-172) {
tmp = t_1;
} else if (c <= 2.4e-12) {
tmp = (b * c) + (j * (k * -27.0));
} else if (c <= 7.8e+148) {
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 = -4.0 * ((t * a) + (x * i)) t_2 = (b * c) - (4.0 * (x * i)) tmp = 0 if c <= -1.7e-13: tmp = t_2 elif c <= 9e-172: tmp = t_1 elif c <= 2.4e-12: tmp = (b * c) + (j * (k * -27.0)) elif c <= 7.8e+148: 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(-4.0 * Float64(Float64(t * a) + Float64(x * i))) t_2 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (c <= -1.7e-13) tmp = t_2; elseif (c <= 9e-172) tmp = t_1; elseif (c <= 2.4e-12) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (c <= 7.8e+148) 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 = -4.0 * ((t * a) + (x * i));
t_2 = (b * c) - (4.0 * (x * i));
tmp = 0.0;
if (c <= -1.7e-13)
tmp = t_2;
elseif (c <= 9e-172)
tmp = t_1;
elseif (c <= 2.4e-12)
tmp = (b * c) + (j * (k * -27.0));
elseif (c <= 7.8e+148)
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[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.7e-13], t$95$2, If[LessEqual[c, 9e-172], t$95$1, If[LessEqual[c, 2.4e-12], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 7.8e+148], 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 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;c \leq -1.7 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 9 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 2.4 \cdot 10^{-12}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;c \leq 7.8 \cdot 10^{+148}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if c < -1.70000000000000008e-13 or 7.80000000000000004e148 < c Initial program 82.1%
Simplified85.9%
associate-*r*85.0%
distribute-rgt-out--82.0%
associate-*l*82.9%
*-commutative82.9%
*-commutative82.9%
Applied egg-rr82.9%
Taylor expanded in y around 0 70.4%
Taylor expanded in j around 0 63.7%
distribute-lft-out63.7%
Simplified63.7%
Taylor expanded in a around 0 54.9%
if -1.70000000000000008e-13 < c < 9.00000000000000008e-172 or 2.39999999999999987e-12 < c < 7.80000000000000004e148Initial program 88.5%
Simplified89.5%
associate-*r*91.0%
distribute-rgt-out--88.5%
associate-*l*86.9%
*-commutative86.9%
*-commutative86.9%
Applied egg-rr86.9%
Taylor expanded in y around 0 74.0%
Taylor expanded in j around 0 61.9%
distribute-lft-out61.9%
Simplified61.9%
Taylor expanded in b around 0 54.6%
if 9.00000000000000008e-172 < c < 2.39999999999999987e-12Initial program 85.9%
Simplified86.6%
Taylor expanded in b around inf 52.5%
Final simplification54.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (- (+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0)))) (+ (* x (* 4.0 i)) (* j (* 27.0 k)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
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) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
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) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
[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) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)))
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(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))) end
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) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
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[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)
\end{array}
Initial program 85.6%
Simplified87.3%
Final simplification87.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))))
(if (<= x -5.1e+26)
t_2
(if (<= x -6.6e-192)
(+ (* b c) t_1)
(if (<= x 4.8e-23) (+ (* -4.0 (* t a)) t_1) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -5.1e+26) {
tmp = t_2;
} else if (x <= -6.6e-192) {
tmp = (b * c) + t_1;
} else if (x <= 4.8e-23) {
tmp = (-4.0 * (t * a)) + t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
if (x <= (-5.1d+26)) then
tmp = t_2
else if (x <= (-6.6d-192)) then
tmp = (b * c) + t_1
else if (x <= 4.8d-23) then
tmp = ((-4.0d0) * (t * a)) + t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -5.1e+26) {
tmp = t_2;
} else if (x <= -6.6e-192) {
tmp = (b * c) + t_1;
} else if (x <= 4.8e-23) {
tmp = (-4.0 * (t * a)) + t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0)) tmp = 0 if x <= -5.1e+26: tmp = t_2 elif x <= -6.6e-192: tmp = (b * c) + t_1 elif x <= 4.8e-23: tmp = (-4.0 * (t * a)) + t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))) tmp = 0.0 if (x <= -5.1e+26) tmp = t_2; elseif (x <= -6.6e-192) tmp = Float64(Float64(b * c) + t_1); elseif (x <= 4.8e-23) tmp = Float64(Float64(-4.0 * Float64(t * a)) + t_1); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
tmp = 0.0;
if (x <= -5.1e+26)
tmp = t_2;
elseif (x <= -6.6e-192)
tmp = (b * c) + t_1;
elseif (x <= 4.8e-23)
tmp = (-4.0 * (t * a)) + t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.1e+26], t$95$2, If[LessEqual[x, -6.6e-192], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 4.8e-23], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{if}\;x \leq -5.1 \cdot 10^{+26}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -6.6 \cdot 10^{-192}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-23}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -5.0999999999999997e26 or 4.79999999999999993e-23 < x Initial program 78.3%
Simplified86.2%
associate-*r*81.9%
distribute-rgt-out--78.3%
associate-*l*79.0%
*-commutative79.0%
*-commutative79.0%
Applied egg-rr79.0%
Taylor expanded in x around inf 74.0%
cancel-sign-sub-inv74.0%
metadata-eval74.0%
*-commutative74.0%
associate-*r*73.9%
Simplified73.9%
if -5.0999999999999997e26 < x < -6.59999999999999978e-192Initial program 93.1%
Simplified91.3%
Taylor expanded in b around inf 58.7%
if -6.59999999999999978e-192 < x < 4.79999999999999993e-23Initial program 94.6%
Simplified88.3%
Taylor expanded in a around inf 58.3%
*-commutative58.3%
Simplified58.3%
Final simplification66.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= j -4.4e+238)
(+ (* (* 18.0 t) (* z (* x y))) t_1)
(if (<= j -9e+147)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= j 2.05e-18)
(- (* b c) (* 4.0 (+ (* t a) (* x i))))
(+ (* -4.0 (* t a)) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (j <= -4.4e+238) {
tmp = ((18.0 * t) * (z * (x * y))) + t_1;
} else if (j <= -9e+147) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (j <= 2.05e-18) {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
} else {
tmp = (-4.0 * (t * a)) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (j <= (-4.4d+238)) then
tmp = ((18.0d0 * t) * (z * (x * y))) + t_1
else if (j <= (-9d+147)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (j <= 2.05d-18) then
tmp = (b * c) - (4.0d0 * ((t * a) + (x * i)))
else
tmp = ((-4.0d0) * (t * a)) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (j <= -4.4e+238) {
tmp = ((18.0 * t) * (z * (x * y))) + t_1;
} else if (j <= -9e+147) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (j <= 2.05e-18) {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
} else {
tmp = (-4.0 * (t * a)) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if j <= -4.4e+238: tmp = ((18.0 * t) * (z * (x * y))) + t_1 elif j <= -9e+147: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif j <= 2.05e-18: tmp = (b * c) - (4.0 * ((t * a) + (x * i))) else: tmp = (-4.0 * (t * a)) + t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (j <= -4.4e+238) tmp = Float64(Float64(Float64(18.0 * t) * Float64(z * Float64(x * y))) + t_1); elseif (j <= -9e+147) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (j <= 2.05e-18) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))); else tmp = Float64(Float64(-4.0 * Float64(t * a)) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if (j <= -4.4e+238)
tmp = ((18.0 * t) * (z * (x * y))) + t_1;
elseif (j <= -9e+147)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (j <= 2.05e-18)
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
else
tmp = (-4.0 * (t * a)) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -4.4e+238], N[(N[(N[(18.0 * t), $MachinePrecision] * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[j, -9e+147], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.05e-18], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;j \leq -4.4 \cdot 10^{+238}:\\
\;\;\;\;\left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right) + t\_1\\
\mathbf{elif}\;j \leq -9 \cdot 10^{+147}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;j \leq 2.05 \cdot 10^{-18}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + t\_1\\
\end{array}
\end{array}
if j < -4.4000000000000001e238Initial program 64.1%
Simplified90.8%
Taylor expanded in y around inf 72.7%
associate-*r*72.7%
associate-*r*72.7%
Simplified72.7%
if -4.4000000000000001e238 < j < -9.00000000000000016e147Initial program 66.8%
Simplified71.7%
Taylor expanded in x around inf 72.1%
if -9.00000000000000016e147 < j < 2.0499999999999999e-18Initial program 89.9%
Simplified89.5%
associate-*r*90.6%
distribute-rgt-out--89.3%
associate-*l*89.9%
*-commutative89.9%
*-commutative89.9%
Applied egg-rr89.9%
Taylor expanded in y around 0 76.9%
Taylor expanded in j around 0 70.2%
distribute-lft-out70.2%
Simplified70.2%
if 2.0499999999999999e-18 < j Initial program 84.9%
Simplified89.4%
Taylor expanded in a around inf 52.5%
*-commutative52.5%
Simplified52.5%
Final simplification65.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= c -0.118)
(* b c)
(if (<= c 7.2e-172)
(* t (* a -4.0))
(if (<= c 62000000000.0)
(* (* j k) -27.0)
(if (<= c 6e+141) (* x (* i -4.0)) (* 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 (c <= -0.118) {
tmp = b * c;
} else if (c <= 7.2e-172) {
tmp = t * (a * -4.0);
} else if (c <= 62000000000.0) {
tmp = (j * k) * -27.0;
} else if (c <= 6e+141) {
tmp = x * (i * -4.0);
} 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 (c <= (-0.118d0)) then
tmp = b * c
else if (c <= 7.2d-172) then
tmp = t * (a * (-4.0d0))
else if (c <= 62000000000.0d0) then
tmp = (j * k) * (-27.0d0)
else if (c <= 6d+141) then
tmp = x * (i * (-4.0d0))
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 (c <= -0.118) {
tmp = b * c;
} else if (c <= 7.2e-172) {
tmp = t * (a * -4.0);
} else if (c <= 62000000000.0) {
tmp = (j * k) * -27.0;
} else if (c <= 6e+141) {
tmp = x * (i * -4.0);
} 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 c <= -0.118: tmp = b * c elif c <= 7.2e-172: tmp = t * (a * -4.0) elif c <= 62000000000.0: tmp = (j * k) * -27.0 elif c <= 6e+141: tmp = x * (i * -4.0) 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 (c <= -0.118) tmp = Float64(b * c); elseif (c <= 7.2e-172) tmp = Float64(t * Float64(a * -4.0)); elseif (c <= 62000000000.0) tmp = Float64(Float64(j * k) * -27.0); elseif (c <= 6e+141) tmp = Float64(x * Float64(i * -4.0)); 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 (c <= -0.118)
tmp = b * c;
elseif (c <= 7.2e-172)
tmp = t * (a * -4.0);
elseif (c <= 62000000000.0)
tmp = (j * k) * -27.0;
elseif (c <= 6e+141)
tmp = x * (i * -4.0);
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[LessEqual[c, -0.118], N[(b * c), $MachinePrecision], If[LessEqual[c, 7.2e-172], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 62000000000.0], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[c, 6e+141], N[(x * N[(i * -4.0), $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}\;c \leq -0.118:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 7.2 \cdot 10^{-172}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;c \leq 62000000000:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;c \leq 6 \cdot 10^{+141}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -0.11799999999999999 or 5.9999999999999998e141 < c Initial program 83.1%
Simplified86.9%
associate-*r*86.0%
distribute-rgt-out--83.0%
associate-*l*83.9%
*-commutative83.9%
*-commutative83.9%
Applied egg-rr83.9%
Taylor expanded in b around inf 40.1%
if -0.11799999999999999 < c < 7.20000000000000029e-172Initial program 87.4%
Simplified88.6%
associate-*r*90.6%
distribute-rgt-out--87.4%
associate-*l*85.4%
*-commutative85.4%
*-commutative85.4%
Applied egg-rr85.4%
Taylor expanded in a around inf 28.1%
associate-*r*28.1%
*-commutative28.1%
*-commutative28.1%
Simplified28.1%
if 7.20000000000000029e-172 < c < 6.2e10Initial program 86.3%
Simplified87.0%
Taylor expanded in j around inf 45.4%
if 6.2e10 < c < 5.9999999999999998e141Initial program 88.2%
Simplified88.2%
associate-*r*88.2%
distribute-rgt-out--88.2%
associate-*l*88.0%
*-commutative88.0%
*-commutative88.0%
Applied egg-rr88.0%
Taylor expanded in i around inf 29.1%
*-commutative29.1%
*-commutative29.1%
associate-*r*29.1%
Simplified29.1%
Final simplification35.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= c -0.165)
(* b c)
(if (<= c 2.05e-171)
(* t (* a -4.0))
(if (<= c 3.8e+131) (* (* j k) -27.0) (* 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 (c <= -0.165) {
tmp = b * c;
} else if (c <= 2.05e-171) {
tmp = t * (a * -4.0);
} else if (c <= 3.8e+131) {
tmp = (j * k) * -27.0;
} 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 (c <= (-0.165d0)) then
tmp = b * c
else if (c <= 2.05d-171) then
tmp = t * (a * (-4.0d0))
else if (c <= 3.8d+131) then
tmp = (j * k) * (-27.0d0)
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 (c <= -0.165) {
tmp = b * c;
} else if (c <= 2.05e-171) {
tmp = t * (a * -4.0);
} else if (c <= 3.8e+131) {
tmp = (j * k) * -27.0;
} 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 c <= -0.165: tmp = b * c elif c <= 2.05e-171: tmp = t * (a * -4.0) elif c <= 3.8e+131: tmp = (j * k) * -27.0 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 (c <= -0.165) tmp = Float64(b * c); elseif (c <= 2.05e-171) tmp = Float64(t * Float64(a * -4.0)); elseif (c <= 3.8e+131) tmp = Float64(Float64(j * k) * -27.0); 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 (c <= -0.165)
tmp = b * c;
elseif (c <= 2.05e-171)
tmp = t * (a * -4.0);
elseif (c <= 3.8e+131)
tmp = (j * k) * -27.0;
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[LessEqual[c, -0.165], N[(b * c), $MachinePrecision], If[LessEqual[c, 2.05e-171], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.8e+131], N[(N[(j * k), $MachinePrecision] * -27.0), $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}\;c \leq -0.165:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 2.05 \cdot 10^{-171}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;c \leq 3.8 \cdot 10^{+131}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -0.165000000000000008 or 3.8000000000000004e131 < c Initial program 82.4%
Simplified86.2%
associate-*r*85.2%
distribute-rgt-out--82.3%
associate-*l*82.3%
*-commutative82.3%
*-commutative82.3%
Applied egg-rr82.3%
Taylor expanded in b around inf 39.4%
if -0.165000000000000008 < c < 2.05e-171Initial program 87.4%
Simplified88.6%
associate-*r*90.6%
distribute-rgt-out--87.4%
associate-*l*85.4%
*-commutative85.4%
*-commutative85.4%
Applied egg-rr85.4%
Taylor expanded in a around inf 28.1%
associate-*r*28.1%
*-commutative28.1%
*-commutative28.1%
Simplified28.1%
if 2.05e-171 < c < 3.8000000000000004e131Initial program 88.3%
Simplified88.8%
Taylor expanded in j around inf 35.0%
Final simplification34.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 (<= c -1.55e-50) (not (<= c 4.2e+131))) (* b c) (* (* j k) -27.0)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((c <= -1.55e-50) || !(c <= 4.2e+131)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((c <= (-1.55d-50)) .or. (.not. (c <= 4.2d+131))) then
tmp = b * c
else
tmp = (j * k) * (-27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((c <= -1.55e-50) || !(c <= 4.2e+131)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (c <= -1.55e-50) or not (c <= 4.2e+131): tmp = b * c else: tmp = (j * k) * -27.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((c <= -1.55e-50) || !(c <= 4.2e+131)) tmp = Float64(b * c); else tmp = Float64(Float64(j * k) * -27.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((c <= -1.55e-50) || ~((c <= 4.2e+131)))
tmp = b * c;
else
tmp = (j * k) * -27.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[c, -1.55e-50], N[Not[LessEqual[c, 4.2e+131]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.55 \cdot 10^{-50} \lor \neg \left(c \leq 4.2 \cdot 10^{+131}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if c < -1.5500000000000001e-50 or 4.19999999999999971e131 < c Initial program 80.9%
Simplified83.5%
associate-*r*83.5%
distribute-rgt-out--80.9%
associate-*l*80.9%
*-commutative80.9%
*-commutative80.9%
Applied egg-rr80.9%
Taylor expanded in b around inf 37.7%
if -1.5500000000000001e-50 < c < 4.19999999999999971e131Initial program 89.4%
Simplified91.1%
Taylor expanded in j around inf 23.8%
Final simplification30.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 85.6%
Simplified87.3%
associate-*r*88.0%
distribute-rgt-out--85.6%
associate-*l*84.8%
*-commutative84.8%
*-commutative84.8%
Applied egg-rr84.8%
Taylor expanded in b around inf 21.6%
Final simplification21.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024047
(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)))