
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= t -2e-38) (not (<= t 1.5e-43)))
(+
(fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* -4.0 i))))
(* j (* k -27.0)))
(fma
(- x)
(fma i 4.0 (* y (* z (* t -18.0))))
(fma -4.0 (* t a) (fma b c (* k (* j -27.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -2e-38) || !(t <= 1.5e-43)) {
tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + (j * (k * -27.0));
} else {
tmp = fma(-x, fma(i, 4.0, (y * (z * (t * -18.0)))), fma(-4.0, (t * a), fma(b, c, (k * (j * -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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -2e-38) || !(t <= 1.5e-43)) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(k * -27.0))); else tmp = fma(Float64(-x), fma(i, 4.0, Float64(y * Float64(z * Float64(t * -18.0)))), fma(-4.0, Float64(t * a), fma(b, c, Float64(k * Float64(j * -27.0))))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -2e-38], N[Not[LessEqual[t, 1.5e-43]], $MachinePrecision]], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-x) * N[(i * 4.0 + N[(y * N[(z * N[(t * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(b * c + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-38} \lor \neg \left(t \leq 1.5 \cdot 10^{-43}\right):\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-x, \mathsf{fma}\left(i, 4, y \cdot \left(z \cdot \left(t \cdot -18\right)\right)\right), \mathsf{fma}\left(-4, t \cdot a, \mathsf{fma}\left(b, c, k \cdot \left(j \cdot -27\right)\right)\right)\right)\\
\end{array}
\end{array}
if t < -1.9999999999999999e-38 or 1.50000000000000002e-43 < t Initial program 87.7%
Simplified93.5%
if -1.9999999999999999e-38 < t < 1.50000000000000002e-43Initial program 86.8%
Simplified85.8%
Taylor expanded in x around -inf 91.3%
Simplified91.3%
pow191.3%
associate-*l*97.9%
Applied egg-rr97.9%
Final simplification95.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))
INFINITY)
(+
(fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* -4.0 i))))
(* j (* k -27.0)))
(* (- x) (fma -18.0 (* y (* t z)) (* i 4.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= ((double) INFINITY)) {
tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + (j * (k * -27.0));
} else {
tmp = -x * fma(-18.0, (y * (t * z)), (i * 4.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) <= Inf) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(-x) * fma(-18.0, Float64(y * Float64(t * z)), Float64(i * 4.0))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-x) * N[(-18.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-x\right) \cdot \mathsf{fma}\left(-18, y \cdot \left(t \cdot z\right), i \cdot 4\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.6%
Simplified95.5%
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%
Simplified36.4%
Taylor expanded in x around -inf 13.6%
Simplified22.7%
Taylor expanded in x around inf 59.3%
mul-1-neg59.3%
*-commutative59.3%
distribute-rgt-neg-in59.3%
fma-define59.3%
*-commutative59.3%
associate-*l*63.8%
*-commutative63.8%
Simplified63.8%
Final simplification92.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))
INFINITY)
(-
(+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(* (- x) (fma -18.0 (* y (* t z)) (* i 4.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= ((double) INFINITY)) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = -x * fma(-18.0, (y * (t * z)), (i * 4.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(Float64(-x) * fma(-18.0, Float64(y * Float64(t * z)), Float64(i * 4.0))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-x) * N[(-18.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-x\right) \cdot \mathsf{fma}\left(-18, y \cdot \left(t \cdot z\right), i \cdot 4\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.6%
Simplified95.5%
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%
Simplified36.4%
Taylor expanded in x around -inf 13.6%
Simplified22.7%
Taylor expanded in x around inf 59.3%
mul-1-neg59.3%
*-commutative59.3%
distribute-rgt-neg-in59.3%
fma-define59.3%
*-commutative59.3%
associate-*l*63.8%
*-commutative63.8%
Simplified63.8%
Final simplification92.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))
INFINITY)
(-
(+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= ((double) INFINITY)) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= Double.POSITIVE_INFINITY) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= math.inf: tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0))) else: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= Inf)
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
else
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\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.6%
Simplified95.5%
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%
Simplified22.7%
Taylor expanded in x around inf 59.3%
Final simplification92.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* b c))))
(if (<= (* b c) -1.8e+209)
t_2
(if (<= (* b c) -6e+179)
(* t (+ (* 18.0 (* x (* y z))) (* a -4.0)))
(if (<= (* b c) -3.4e+63)
t_2
(if (<= (* b c) -9e-110)
(+ t_1 (* x (* -4.0 i)))
(if (<= (* b c) 9.2e+125) (+ t_1 (* -4.0 (* t a))) t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (b * c);
double tmp;
if ((b * c) <= -1.8e+209) {
tmp = t_2;
} else if ((b * c) <= -6e+179) {
tmp = t * ((18.0 * (x * (y * z))) + (a * -4.0));
} else if ((b * c) <= -3.4e+63) {
tmp = t_2;
} else if ((b * c) <= -9e-110) {
tmp = t_1 + (x * (-4.0 * i));
} else if ((b * c) <= 9.2e+125) {
tmp = t_1 + (-4.0 * (t * a));
} 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + (b * c)
if ((b * c) <= (-1.8d+209)) then
tmp = t_2
else if ((b * c) <= (-6d+179)) then
tmp = t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))
else if ((b * c) <= (-3.4d+63)) then
tmp = t_2
else if ((b * c) <= (-9d-110)) then
tmp = t_1 + (x * ((-4.0d0) * i))
else if ((b * c) <= 9.2d+125) then
tmp = t_1 + ((-4.0d0) * (t * a))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (b * c);
double tmp;
if ((b * c) <= -1.8e+209) {
tmp = t_2;
} else if ((b * c) <= -6e+179) {
tmp = t * ((18.0 * (x * (y * z))) + (a * -4.0));
} else if ((b * c) <= -3.4e+63) {
tmp = t_2;
} else if ((b * c) <= -9e-110) {
tmp = t_1 + (x * (-4.0 * i));
} else if ((b * c) <= 9.2e+125) {
tmp = t_1 + (-4.0 * (t * a));
} 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (b * c) tmp = 0 if (b * c) <= -1.8e+209: tmp = t_2 elif (b * c) <= -6e+179: tmp = t * ((18.0 * (x * (y * z))) + (a * -4.0)) elif (b * c) <= -3.4e+63: tmp = t_2 elif (b * c) <= -9e-110: tmp = t_1 + (x * (-4.0 * i)) elif (b * c) <= 9.2e+125: tmp = t_1 + (-4.0 * (t * a)) 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(b * c)) tmp = 0.0 if (Float64(b * c) <= -1.8e+209) tmp = t_2; elseif (Float64(b * c) <= -6e+179) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0))); elseif (Float64(b * c) <= -3.4e+63) tmp = t_2; elseif (Float64(b * c) <= -9e-110) tmp = Float64(t_1 + Float64(x * Float64(-4.0 * i))); elseif (Float64(b * c) <= 9.2e+125) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (b * c);
tmp = 0.0;
if ((b * c) <= -1.8e+209)
tmp = t_2;
elseif ((b * c) <= -6e+179)
tmp = t * ((18.0 * (x * (y * z))) + (a * -4.0));
elseif ((b * c) <= -3.4e+63)
tmp = t_2;
elseif ((b * c) <= -9e-110)
tmp = t_1 + (x * (-4.0 * i));
elseif ((b * c) <= 9.2e+125)
tmp = t_1 + (-4.0 * (t * a));
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.8e+209], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -6e+179], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.4e+63], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -9e-110], N[(t$95$1 + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9.2e+125], N[(t$95$1 + N[(-4.0 * N[(t * a), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t\_1 + b \cdot c\\
\mathbf{if}\;b \cdot c \leq -1.8 \cdot 10^{+209}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -6 \cdot 10^{+179}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq -3.4 \cdot 10^{+63}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -9 \cdot 10^{-110}:\\
\;\;\;\;t\_1 + x \cdot \left(-4 \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 9.2 \cdot 10^{+125}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 b c) < -1.80000000000000006e209 or -5.9999999999999996e179 < (*.f64 b c) < -3.3999999999999999e63 or 9.20000000000000051e125 < (*.f64 b c) Initial program 83.2%
Simplified86.8%
Taylor expanded in b around inf 76.4%
if -1.80000000000000006e209 < (*.f64 b c) < -5.9999999999999996e179Initial program 88.3%
Simplified100.0%
Taylor expanded in x around -inf 99.8%
Simplified99.8%
Taylor expanded in t around inf 75.5%
if -3.3999999999999999e63 < (*.f64 b c) < -9.0000000000000002e-110Initial program 88.4%
Simplified88.4%
Taylor expanded in i around inf 79.5%
associate-*r*79.5%
*-commutative79.5%
Simplified79.5%
if -9.0000000000000002e-110 < (*.f64 b c) < 9.20000000000000051e125Initial program 89.5%
Simplified92.3%
Taylor expanded in a around inf 61.2%
*-commutative61.2%
Simplified61.2%
Final simplification68.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a))))
(t_2 (* -27.0 (* j k)))
(t_3 (* x (* -4.0 i))))
(if (<= i -1e+108)
t_3
(if (<= i -2.8e-193)
t_1
(if (<= i -1.31e-291)
(* (* x 18.0) (* y (* t z)))
(if (<= i 4.5e-289)
t_2
(if (<= i 2.6e-41)
t_1
(if (<= i 1650000.0) t_2 (if (<= i 2.6e+189) t_1 t_3)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double t_2 = -27.0 * (j * k);
double t_3 = x * (-4.0 * i);
double tmp;
if (i <= -1e+108) {
tmp = t_3;
} else if (i <= -2.8e-193) {
tmp = t_1;
} else if (i <= -1.31e-291) {
tmp = (x * 18.0) * (y * (t * z));
} else if (i <= 4.5e-289) {
tmp = t_2;
} else if (i <= 2.6e-41) {
tmp = t_1;
} else if (i <= 1650000.0) {
tmp = t_2;
} else if (i <= 2.6e+189) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (b * c) + ((-4.0d0) * (t * a))
t_2 = (-27.0d0) * (j * k)
t_3 = x * ((-4.0d0) * i)
if (i <= (-1d+108)) then
tmp = t_3
else if (i <= (-2.8d-193)) then
tmp = t_1
else if (i <= (-1.31d-291)) then
tmp = (x * 18.0d0) * (y * (t * z))
else if (i <= 4.5d-289) then
tmp = t_2
else if (i <= 2.6d-41) then
tmp = t_1
else if (i <= 1650000.0d0) then
tmp = t_2
else if (i <= 2.6d+189) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double t_2 = -27.0 * (j * k);
double t_3 = x * (-4.0 * i);
double tmp;
if (i <= -1e+108) {
tmp = t_3;
} else if (i <= -2.8e-193) {
tmp = t_1;
} else if (i <= -1.31e-291) {
tmp = (x * 18.0) * (y * (t * z));
} else if (i <= 4.5e-289) {
tmp = t_2;
} else if (i <= 2.6e-41) {
tmp = t_1;
} else if (i <= 1650000.0) {
tmp = t_2;
} else if (i <= 2.6e+189) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) t_2 = -27.0 * (j * k) t_3 = x * (-4.0 * i) tmp = 0 if i <= -1e+108: tmp = t_3 elif i <= -2.8e-193: tmp = t_1 elif i <= -1.31e-291: tmp = (x * 18.0) * (y * (t * z)) elif i <= 4.5e-289: tmp = t_2 elif i <= 2.6e-41: tmp = t_1 elif i <= 1650000.0: tmp = t_2 elif i <= 2.6e+189: tmp = t_1 else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) t_2 = Float64(-27.0 * Float64(j * k)) t_3 = Float64(x * Float64(-4.0 * i)) tmp = 0.0 if (i <= -1e+108) tmp = t_3; elseif (i <= -2.8e-193) tmp = t_1; elseif (i <= -1.31e-291) tmp = Float64(Float64(x * 18.0) * Float64(y * Float64(t * z))); elseif (i <= 4.5e-289) tmp = t_2; elseif (i <= 2.6e-41) tmp = t_1; elseif (i <= 1650000.0) tmp = t_2; elseif (i <= 2.6e+189) tmp = t_1; else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (-4.0 * (t * a));
t_2 = -27.0 * (j * k);
t_3 = x * (-4.0 * i);
tmp = 0.0;
if (i <= -1e+108)
tmp = t_3;
elseif (i <= -2.8e-193)
tmp = t_1;
elseif (i <= -1.31e-291)
tmp = (x * 18.0) * (y * (t * z));
elseif (i <= 4.5e-289)
tmp = t_2;
elseif (i <= 2.6e-41)
tmp = t_1;
elseif (i <= 1650000.0)
tmp = t_2;
elseif (i <= 2.6e+189)
tmp = t_1;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1e+108], t$95$3, If[LessEqual[i, -2.8e-193], t$95$1, If[LessEqual[i, -1.31e-291], N[(N[(x * 18.0), $MachinePrecision] * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 4.5e-289], t$95$2, If[LessEqual[i, 2.6e-41], t$95$1, If[LessEqual[i, 1650000.0], t$95$2, If[LessEqual[i, 2.6e+189], t$95$1, t$95$3]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
t_2 := -27 \cdot \left(j \cdot k\right)\\
t_3 := x \cdot \left(-4 \cdot i\right)\\
\mathbf{if}\;i \leq -1 \cdot 10^{+108}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;i \leq -2.8 \cdot 10^{-193}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq -1.31 \cdot 10^{-291}:\\
\;\;\;\;\left(x \cdot 18\right) \cdot \left(y \cdot \left(t \cdot z\right)\right)\\
\mathbf{elif}\;i \leq 4.5 \cdot 10^{-289}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq 2.6 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1650000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq 2.6 \cdot 10^{+189}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if i < -1e108 or 2.59999999999999981e189 < i Initial program 84.8%
Simplified87.5%
Taylor expanded in x around -inf 87.5%
Simplified87.6%
Taylor expanded in i around inf 55.9%
associate-*r*55.9%
*-commutative55.9%
Simplified55.9%
if -1e108 < i < -2.8000000000000002e-193 or 4.5000000000000002e-289 < i < 2.5999999999999999e-41 or 1.65e6 < i < 2.59999999999999981e189Initial program 90.3%
Simplified90.9%
Taylor expanded in x around 0 75.5%
associate--l+75.5%
*-commutative75.5%
associate-*r*75.5%
fma-define76.2%
*-commutative76.2%
*-commutative76.2%
Applied egg-rr76.2%
Taylor expanded in k around 0 60.5%
if -2.8000000000000002e-193 < i < -1.31e-291Initial program 76.7%
Simplified76.8%
Taylor expanded in x around -inf 82.4%
Simplified82.7%
pow182.7%
associate-*l*94.5%
Applied egg-rr94.5%
Taylor expanded in y around inf 46.3%
*-commutative46.3%
*-commutative46.3%
associate-*r*46.4%
associate-*l*46.4%
*-commutative46.4%
associate-*l*58.1%
*-commutative58.1%
Simplified58.1%
if -1.31e-291 < i < 4.5000000000000002e-289 or 2.5999999999999999e-41 < i < 1.65e6Initial program 81.8%
Simplified93.6%
Taylor expanded in j around inf 75.5%
Final simplification60.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))))
(t_3 (+ t_1 (* -4.0 (* t a)))))
(if (<= c -1.6e-232)
t_2
(if (<= c -2.35e-281)
t_3
(if (<= c 4.4e-265)
t_2
(if (<= c 9e-63)
t_3
(if (<= c 9e+14)
(+ t_1 (* x (* -4.0 i)))
(if (<= c 2.3e+91)
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))
(+ t_1 (* b c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
double t_3 = t_1 + (-4.0 * (t * a));
double tmp;
if (c <= -1.6e-232) {
tmp = t_2;
} else if (c <= -2.35e-281) {
tmp = t_3;
} else if (c <= 4.4e-265) {
tmp = t_2;
} else if (c <= 9e-63) {
tmp = t_3;
} else if (c <= 9e+14) {
tmp = t_1 + (x * (-4.0 * i));
} else if (c <= 2.3e+91) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else {
tmp = t_1 + (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))
t_3 = t_1 + ((-4.0d0) * (t * a))
if (c <= (-1.6d-232)) then
tmp = t_2
else if (c <= (-2.35d-281)) then
tmp = t_3
else if (c <= 4.4d-265) then
tmp = t_2
else if (c <= 9d-63) then
tmp = t_3
else if (c <= 9d+14) then
tmp = t_1 + (x * ((-4.0d0) * i))
else if (c <= 2.3d+91) then
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
else
tmp = t_1 + (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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
double t_3 = t_1 + (-4.0 * (t * a));
double tmp;
if (c <= -1.6e-232) {
tmp = t_2;
} else if (c <= -2.35e-281) {
tmp = t_3;
} else if (c <= 4.4e-265) {
tmp = t_2;
} else if (c <= 9e-63) {
tmp = t_3;
} else if (c <= 9e+14) {
tmp = t_1 + (x * (-4.0 * i));
} else if (c <= 2.3e+91) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else {
tmp = t_1 + (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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0)) t_3 = t_1 + (-4.0 * (t * a)) tmp = 0 if c <= -1.6e-232: tmp = t_2 elif c <= -2.35e-281: tmp = t_3 elif c <= 4.4e-265: tmp = t_2 elif c <= 9e-63: tmp = t_3 elif c <= 9e+14: tmp = t_1 + (x * (-4.0 * i)) elif c <= 2.3e+91: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) else: tmp = t_1 + (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0))) t_3 = Float64(t_1 + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (c <= -1.6e-232) tmp = t_2; elseif (c <= -2.35e-281) tmp = t_3; elseif (c <= 4.4e-265) tmp = t_2; elseif (c <= 9e-63) tmp = t_3; elseif (c <= 9e+14) tmp = Float64(t_1 + Float64(x * Float64(-4.0 * i))); elseif (c <= 2.3e+91) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); else tmp = Float64(t_1 + 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
t_3 = t_1 + (-4.0 * (t * a));
tmp = 0.0;
if (c <= -1.6e-232)
tmp = t_2;
elseif (c <= -2.35e-281)
tmp = t_3;
elseif (c <= 4.4e-265)
tmp = t_2;
elseif (c <= 9e-63)
tmp = t_3;
elseif (c <= 9e+14)
tmp = t_1 + (x * (-4.0 * i));
elseif (c <= 2.3e+91)
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
else
tmp = t_1 + (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.6e-232], t$95$2, If[LessEqual[c, -2.35e-281], t$95$3, If[LessEqual[c, 4.4e-265], t$95$2, If[LessEqual[c, 9e-63], t$95$3, If[LessEqual[c, 9e+14], N[(t$95$1 + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.3e+91], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(b * c), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
t_3 := t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;c \leq -1.6 \cdot 10^{-232}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -2.35 \cdot 10^{-281}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;c \leq 4.4 \cdot 10^{-265}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 9 \cdot 10^{-63}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;c \leq 9 \cdot 10^{+14}:\\
\;\;\;\;t\_1 + x \cdot \left(-4 \cdot i\right)\\
\mathbf{elif}\;c \leq 2.3 \cdot 10^{+91}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + b \cdot c\\
\end{array}
\end{array}
if c < -1.59999999999999993e-232 or -2.3500000000000001e-281 < c < 4.40000000000000021e-265Initial program 85.4%
Simplified88.0%
Taylor expanded in x around -inf 87.0%
Simplified87.1%
Taylor expanded in t around inf 52.4%
if -1.59999999999999993e-232 < c < -2.3500000000000001e-281 or 4.40000000000000021e-265 < c < 8.9999999999999999e-63Initial program 92.2%
Simplified94.1%
Taylor expanded in a around inf 72.5%
*-commutative72.5%
Simplified72.5%
if 8.9999999999999999e-63 < c < 9e14Initial program 93.6%
Simplified87.6%
Taylor expanded in i around inf 63.6%
associate-*r*63.6%
*-commutative63.6%
Simplified63.6%
if 9e14 < c < 2.29999999999999991e91Initial program 88.2%
Simplified87.8%
Taylor expanded in x around inf 55.4%
if 2.29999999999999991e91 < c Initial program 84.2%
Simplified94.2%
Taylor expanded in b around inf 68.4%
Final simplification60.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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))))
(if (<= (* b c) -1.95e+305)
(* b c)
(if (<= (* b c) -9e-61)
(* j (* k -27.0))
(if (<= (* b c) -1.3e-132)
t_1
(if (<= (* b c) 2.6e-80)
(* k (* j -27.0))
(if (<= (* b c) 4.9e+61) t_1 (* b c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (-4.0 * i);
double tmp;
if ((b * c) <= -1.95e+305) {
tmp = b * c;
} else if ((b * c) <= -9e-61) {
tmp = j * (k * -27.0);
} else if ((b * c) <= -1.3e-132) {
tmp = t_1;
} else if ((b * c) <= 2.6e-80) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 4.9e+61) {
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.
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)
if ((b * c) <= (-1.95d+305)) then
tmp = b * c
else if ((b * c) <= (-9d-61)) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= (-1.3d-132)) then
tmp = t_1
else if ((b * c) <= 2.6d-80) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 4.9d+61) 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (-4.0 * i);
double tmp;
if ((b * c) <= -1.95e+305) {
tmp = b * c;
} else if ((b * c) <= -9e-61) {
tmp = j * (k * -27.0);
} else if ((b * c) <= -1.3e-132) {
tmp = t_1;
} else if ((b * c) <= 2.6e-80) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 4.9e+61) {
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]) [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) tmp = 0 if (b * c) <= -1.95e+305: tmp = b * c elif (b * c) <= -9e-61: tmp = j * (k * -27.0) elif (b * c) <= -1.3e-132: tmp = t_1 elif (b * c) <= 2.6e-80: tmp = k * (j * -27.0) elif (b * c) <= 4.9e+61: 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(-4.0 * i)) tmp = 0.0 if (Float64(b * c) <= -1.95e+305) tmp = Float64(b * c); elseif (Float64(b * c) <= -9e-61) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= -1.3e-132) tmp = t_1; elseif (Float64(b * c) <= 2.6e-80) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 4.9e+61) 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])){:}
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);
tmp = 0.0;
if ((b * c) <= -1.95e+305)
tmp = b * c;
elseif ((b * c) <= -9e-61)
tmp = j * (k * -27.0);
elseif ((b * c) <= -1.3e-132)
tmp = t_1;
elseif ((b * c) <= 2.6e-80)
tmp = k * (j * -27.0);
elseif ((b * c) <= 4.9e+61)
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.95e+305], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -9e-61], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.3e-132], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2.6e-80], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4.9e+61], 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])\\\\
[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)\\
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -9 \cdot 10^{-61}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq -1.3 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 2.6 \cdot 10^{-80}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 4.9 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.95e305 or 4.90000000000000025e61 < (*.f64 b c) Initial program 83.1%
Simplified87.3%
Taylor expanded in x around -inf 82.9%
Simplified85.8%
Taylor expanded in b around inf 67.0%
if -1.95e305 < (*.f64 b c) < -9e-61Initial program 89.9%
Simplified91.9%
Taylor expanded in x around -inf 91.7%
Simplified91.7%
Taylor expanded in k around inf 36.1%
associate-*r*36.1%
*-commutative36.1%
associate-*r*36.1%
Simplified36.1%
if -9e-61 < (*.f64 b c) < -1.3e-132 or 2.6000000000000001e-80 < (*.f64 b c) < 4.90000000000000025e61Initial program 87.9%
Simplified91.9%
Taylor expanded in x around -inf 87.9%
Simplified87.9%
Taylor expanded in i around inf 43.0%
associate-*r*43.0%
*-commutative43.0%
Simplified43.0%
if -1.3e-132 < (*.f64 b c) < 2.6000000000000001e-80Initial program 89.0%
Simplified91.3%
Taylor expanded in j around inf 35.0%
*-commutative35.0%
*-commutative35.0%
associate-*r*35.0%
Simplified35.0%
Final simplification45.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (* a (* t -4.0))) (t_2 (* (* x 18.0) (* y (* t z)))))
(if (<= t -5e+251)
t_2
(if (<= t -1.05e+61)
t_1
(if (<= t -6.5e-298)
(* k (* j -27.0))
(if (<= t 1.3e-150)
(* x (* -4.0 i))
(if (<= t 2000000000.0) (* b c) (if (<= t 3.6e+82) t_1 t_2))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double t_2 = (x * 18.0) * (y * (t * z));
double tmp;
if (t <= -5e+251) {
tmp = t_2;
} else if (t <= -1.05e+61) {
tmp = t_1;
} else if (t <= -6.5e-298) {
tmp = k * (j * -27.0);
} else if (t <= 1.3e-150) {
tmp = x * (-4.0 * i);
} else if (t <= 2000000000.0) {
tmp = b * c;
} else if (t <= 3.6e+82) {
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.
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 = a * (t * (-4.0d0))
t_2 = (x * 18.0d0) * (y * (t * z))
if (t <= (-5d+251)) then
tmp = t_2
else if (t <= (-1.05d+61)) then
tmp = t_1
else if (t <= (-6.5d-298)) then
tmp = k * (j * (-27.0d0))
else if (t <= 1.3d-150) then
tmp = x * ((-4.0d0) * i)
else if (t <= 2000000000.0d0) then
tmp = b * c
else if (t <= 3.6d+82) 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;
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 = a * (t * -4.0);
double t_2 = (x * 18.0) * (y * (t * z));
double tmp;
if (t <= -5e+251) {
tmp = t_2;
} else if (t <= -1.05e+61) {
tmp = t_1;
} else if (t <= -6.5e-298) {
tmp = k * (j * -27.0);
} else if (t <= 1.3e-150) {
tmp = x * (-4.0 * i);
} else if (t <= 2000000000.0) {
tmp = b * c;
} else if (t <= 3.6e+82) {
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]) [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 = a * (t * -4.0) t_2 = (x * 18.0) * (y * (t * z)) tmp = 0 if t <= -5e+251: tmp = t_2 elif t <= -1.05e+61: tmp = t_1 elif t <= -6.5e-298: tmp = k * (j * -27.0) elif t <= 1.3e-150: tmp = x * (-4.0 * i) elif t <= 2000000000.0: tmp = b * c elif t <= 3.6e+82: 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]) 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(a * Float64(t * -4.0)) t_2 = Float64(Float64(x * 18.0) * Float64(y * Float64(t * z))) tmp = 0.0 if (t <= -5e+251) tmp = t_2; elseif (t <= -1.05e+61) tmp = t_1; elseif (t <= -6.5e-298) tmp = Float64(k * Float64(j * -27.0)); elseif (t <= 1.3e-150) tmp = Float64(x * Float64(-4.0 * i)); elseif (t <= 2000000000.0) tmp = Float64(b * c); elseif (t <= 3.6e+82) 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])){:}
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 = a * (t * -4.0);
t_2 = (x * 18.0) * (y * (t * z));
tmp = 0.0;
if (t <= -5e+251)
tmp = t_2;
elseif (t <= -1.05e+61)
tmp = t_1;
elseif (t <= -6.5e-298)
tmp = k * (j * -27.0);
elseif (t <= 1.3e-150)
tmp = x * (-4.0 * i);
elseif (t <= 2000000000.0)
tmp = b * c;
elseif (t <= 3.6e+82)
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.
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[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 18.0), $MachinePrecision] * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e+251], t$95$2, If[LessEqual[t, -1.05e+61], t$95$1, If[LessEqual[t, -6.5e-298], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-150], N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2000000000.0], N[(b * c), $MachinePrecision], If[LessEqual[t, 3.6e+82], 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])\\\\
[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 := a \cdot \left(t \cdot -4\right)\\
t_2 := \left(x \cdot 18\right) \cdot \left(y \cdot \left(t \cdot z\right)\right)\\
\mathbf{if}\;t \leq -5 \cdot 10^{+251}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-298}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-150}:\\
\;\;\;\;x \cdot \left(-4 \cdot i\right)\\
\mathbf{elif}\;t \leq 2000000000:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.0000000000000005e251 or 3.60000000000000014e82 < t Initial program 76.5%
Simplified87.5%
Taylor expanded in x around -inf 73.7%
Simplified75.3%
pow175.3%
associate-*l*69.1%
Applied egg-rr69.1%
Taylor expanded in y around inf 51.0%
*-commutative51.0%
*-commutative51.0%
associate-*r*51.2%
associate-*l*51.2%
*-commutative51.2%
associate-*l*51.2%
*-commutative51.2%
Simplified51.2%
if -5.0000000000000005e251 < t < -1.0500000000000001e61 or 2e9 < t < 3.60000000000000014e82Initial program 94.7%
Simplified96.3%
Taylor expanded in x around -inf 91.0%
Simplified92.8%
Taylor expanded in a around inf 49.4%
*-commutative49.4%
associate-*r*49.4%
Simplified49.4%
if -1.0500000000000001e61 < t < -6.5000000000000002e-298Initial program 91.6%
Simplified92.7%
Taylor expanded in j around inf 40.1%
*-commutative40.1%
*-commutative40.1%
associate-*r*40.1%
Simplified40.1%
if -6.5000000000000002e-298 < t < 1.2999999999999999e-150Initial program 82.2%
Simplified79.3%
Taylor expanded in x around -inf 87.8%
Simplified87.8%
Taylor expanded in i around inf 49.9%
associate-*r*49.9%
*-commutative49.9%
Simplified49.9%
if 1.2999999999999999e-150 < t < 2e9Initial program 92.5%
Simplified92.5%
Taylor expanded in x around -inf 96.1%
Simplified96.2%
Taylor expanded in b around inf 45.3%
Final simplification46.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k))))
(t_2 (* x (- (* 18.0 (* t (* y z))) (* i 4.0)))))
(if (<= x -1.32e+184)
t_2
(if (<= x 7.5e-56)
t_1
(if (<= x 0.27)
(+ (* j (* k -27.0)) (* 18.0 (* x (* y (* t z)))))
(if (<= x 1.18e+225) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
double t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double tmp;
if (x <= -1.32e+184) {
tmp = t_2;
} else if (x <= 7.5e-56) {
tmp = t_1;
} else if (x <= 0.27) {
tmp = (j * (k * -27.0)) + (18.0 * (x * (y * (t * z))));
} else if (x <= 1.18e+225) {
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
t_2 = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
if (x <= (-1.32d+184)) then
tmp = t_2
else if (x <= 7.5d-56) then
tmp = t_1
else if (x <= 0.27d0) then
tmp = (j * (k * (-27.0d0))) + (18.0d0 * (x * (y * (t * z))))
else if (x <= 1.18d+225) 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
double t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double tmp;
if (x <= -1.32e+184) {
tmp = t_2;
} else if (x <= 7.5e-56) {
tmp = t_1;
} else if (x <= 0.27) {
tmp = (j * (k * -27.0)) + (18.0 * (x * (y * (t * z))));
} else if (x <= 1.18e+225) {
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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0)) tmp = 0 if x <= -1.32e+184: tmp = t_2 elif x <= 7.5e-56: tmp = t_1 elif x <= 0.27: tmp = (j * (k * -27.0)) + (18.0 * (x * (y * (t * z)))) elif x <= 1.18e+225: 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]) 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(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))) t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))) tmp = 0.0 if (x <= -1.32e+184) tmp = t_2; elseif (x <= 7.5e-56) tmp = t_1; elseif (x <= 0.27) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(18.0 * Float64(x * Float64(y * Float64(t * z))))); elseif (x <= 1.18e+225) 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
tmp = 0.0;
if (x <= -1.32e+184)
tmp = t_2;
elseif (x <= 7.5e-56)
tmp = t_1;
elseif (x <= 0.27)
tmp = (j * (k * -27.0)) + (18.0 * (x * (y * (t * z))));
elseif (x <= 1.18e+225)
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.
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[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.32e+184], t$95$2, If[LessEqual[x, 7.5e-56], t$95$1, If[LessEqual[x, 0.27], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(x * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.18e+225], 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])\\\\
[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(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{if}\;x \leq -1.32 \cdot 10^{+184}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 0.27:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(x \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.18 \cdot 10^{+225}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.32000000000000004e184 or 1.17999999999999992e225 < x Initial program 63.5%
Simplified70.4%
Taylor expanded in x around inf 79.7%
if -1.32000000000000004e184 < x < 7.50000000000000041e-56 or 0.27000000000000002 < x < 1.17999999999999992e225Initial program 92.7%
Simplified93.6%
Taylor expanded in x around 0 75.1%
if 7.50000000000000041e-56 < x < 0.27000000000000002Initial program 82.3%
Simplified82.0%
Taylor expanded in y around inf 73.8%
pow173.8%
associate-*r*73.8%
Applied egg-rr73.8%
unpow173.8%
*-commutative73.8%
associate-*r*73.8%
associate-*l*73.8%
associate-*l*82.1%
*-commutative82.1%
Simplified82.1%
Final simplification76.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= k -3.3e-29)
(+ (* j (* k -27.0)) (* b c))
(if (<= k 4.6e+178)
(- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (* 4.0 (* x i)))
(- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -3.3e-29) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (k <= 4.6e+178) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-3.3d-29)) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else if (k <= 4.6d+178) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -3.3e-29) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (k <= 4.6e+178) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -3.3e-29: tmp = (j * (k * -27.0)) + (b * c) elif k <= 4.6e+178: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) else: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -3.3e-29) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); elseif (k <= 4.6e+178) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -3.3e-29)
tmp = (j * (k * -27.0)) + (b * c);
elseif (k <= 4.6e+178)
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
else
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -3.3e-29], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.6e+178], 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] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -3.3 \cdot 10^{-29}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{elif}\;k \leq 4.6 \cdot 10^{+178}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if k < -3.30000000000000028e-29Initial program 83.9%
Simplified85.5%
Taylor expanded in b around inf 56.7%
if -3.30000000000000028e-29 < k < 4.6000000000000002e178Initial program 87.8%
Simplified90.2%
Taylor expanded in j around 0 78.9%
if 4.6000000000000002e178 < k Initial program 92.8%
Simplified92.8%
Taylor expanded in x around 0 89.8%
Final simplification74.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* b c))))
(if (<= (* b c) -1.25e-61)
t_2
(if (<= (* b c) -1.05e-109)
(* x (* -4.0 i))
(if (<= (* b c) 4.2e+123) (+ t_1 (* -4.0 (* t a))) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (b * c);
double tmp;
if ((b * c) <= -1.25e-61) {
tmp = t_2;
} else if ((b * c) <= -1.05e-109) {
tmp = x * (-4.0 * i);
} else if ((b * c) <= 4.2e+123) {
tmp = t_1 + (-4.0 * (t * a));
} 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + (b * c)
if ((b * c) <= (-1.25d-61)) then
tmp = t_2
else if ((b * c) <= (-1.05d-109)) then
tmp = x * ((-4.0d0) * i)
else if ((b * c) <= 4.2d+123) then
tmp = t_1 + ((-4.0d0) * (t * a))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (b * c);
double tmp;
if ((b * c) <= -1.25e-61) {
tmp = t_2;
} else if ((b * c) <= -1.05e-109) {
tmp = x * (-4.0 * i);
} else if ((b * c) <= 4.2e+123) {
tmp = t_1 + (-4.0 * (t * a));
} 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (b * c) tmp = 0 if (b * c) <= -1.25e-61: tmp = t_2 elif (b * c) <= -1.05e-109: tmp = x * (-4.0 * i) elif (b * c) <= 4.2e+123: tmp = t_1 + (-4.0 * (t * a)) 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(b * c)) tmp = 0.0 if (Float64(b * c) <= -1.25e-61) tmp = t_2; elseif (Float64(b * c) <= -1.05e-109) tmp = Float64(x * Float64(-4.0 * i)); elseif (Float64(b * c) <= 4.2e+123) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (b * c);
tmp = 0.0;
if ((b * c) <= -1.25e-61)
tmp = t_2;
elseif ((b * c) <= -1.05e-109)
tmp = x * (-4.0 * i);
elseif ((b * c) <= 4.2e+123)
tmp = t_1 + (-4.0 * (t * a));
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.25e-61], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -1.05e-109], N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4.2e+123], N[(t$95$1 + N[(-4.0 * N[(t * a), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t\_1 + b \cdot c\\
\mathbf{if}\;b \cdot c \leq -1.25 \cdot 10^{-61}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -1.05 \cdot 10^{-109}:\\
\;\;\;\;x \cdot \left(-4 \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 4.2 \cdot 10^{+123}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 b c) < -1.25e-61 or 4.19999999999999988e123 < (*.f64 b c) Initial program 85.3%
Simplified88.9%
Taylor expanded in b around inf 68.1%
if -1.25e-61 < (*.f64 b c) < -1.04999999999999998e-109Initial program 77.8%
Simplified78.1%
Taylor expanded in x around -inf 78.1%
Simplified78.1%
Taylor expanded in i around inf 89.5%
associate-*r*89.5%
*-commutative89.5%
Simplified89.5%
if -1.04999999999999998e-109 < (*.f64 b c) < 4.19999999999999988e123Initial program 89.5%
Simplified92.3%
Taylor expanded in a around inf 61.2%
*-commutative61.2%
Simplified61.2%
Final simplification65.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* b c))))
(if (<= (* b c) -2e+67)
t_2
(if (<= (* b c) -8.8e-110)
(+ t_1 (* x (* -4.0 i)))
(if (<= (* b c) 1.75e+123) (+ t_1 (* -4.0 (* t a))) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (b * c);
double tmp;
if ((b * c) <= -2e+67) {
tmp = t_2;
} else if ((b * c) <= -8.8e-110) {
tmp = t_1 + (x * (-4.0 * i));
} else if ((b * c) <= 1.75e+123) {
tmp = t_1 + (-4.0 * (t * a));
} 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + (b * c)
if ((b * c) <= (-2d+67)) then
tmp = t_2
else if ((b * c) <= (-8.8d-110)) then
tmp = t_1 + (x * ((-4.0d0) * i))
else if ((b * c) <= 1.75d+123) then
tmp = t_1 + ((-4.0d0) * (t * a))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (b * c);
double tmp;
if ((b * c) <= -2e+67) {
tmp = t_2;
} else if ((b * c) <= -8.8e-110) {
tmp = t_1 + (x * (-4.0 * i));
} else if ((b * c) <= 1.75e+123) {
tmp = t_1 + (-4.0 * (t * a));
} 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (b * c) tmp = 0 if (b * c) <= -2e+67: tmp = t_2 elif (b * c) <= -8.8e-110: tmp = t_1 + (x * (-4.0 * i)) elif (b * c) <= 1.75e+123: tmp = t_1 + (-4.0 * (t * a)) 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(b * c)) tmp = 0.0 if (Float64(b * c) <= -2e+67) tmp = t_2; elseif (Float64(b * c) <= -8.8e-110) tmp = Float64(t_1 + Float64(x * Float64(-4.0 * i))); elseif (Float64(b * c) <= 1.75e+123) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (b * c);
tmp = 0.0;
if ((b * c) <= -2e+67)
tmp = t_2;
elseif ((b * c) <= -8.8e-110)
tmp = t_1 + (x * (-4.0 * i));
elseif ((b * c) <= 1.75e+123)
tmp = t_1 + (-4.0 * (t * a));
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+67], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -8.8e-110], N[(t$95$1 + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.75e+123], N[(t$95$1 + N[(-4.0 * N[(t * a), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t\_1 + b \cdot c\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+67}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -8.8 \cdot 10^{-110}:\\
\;\;\;\;t\_1 + x \cdot \left(-4 \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 1.75 \cdot 10^{+123}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 b c) < -1.99999999999999997e67 or 1.75e123 < (*.f64 b c) Initial program 83.6%
Simplified88.0%
Taylor expanded in b around inf 71.1%
if -1.99999999999999997e67 < (*.f64 b c) < -8.7999999999999997e-110Initial program 88.4%
Simplified88.4%
Taylor expanded in i around inf 79.5%
associate-*r*79.5%
*-commutative79.5%
Simplified79.5%
if -8.7999999999999997e-110 < (*.f64 b c) < 1.75e123Initial program 89.5%
Simplified92.3%
Taylor expanded in a around inf 61.2%
*-commutative61.2%
Simplified61.2%
Final simplification66.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 -8.5e+183)
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))
(if (<= x 3.1e-114)
(- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))
(+ (* j (* k -27.0)) (* t (+ (* 18.0 (* x (* y z))) (* a -4.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -8.5e+183) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else if (x <= 3.1e-114) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-8.5d+183)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
else if (x <= 3.1d-114) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
else
tmp = (j * (k * (-27.0d0))) + (t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -8.5e+183) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else if (x <= 3.1e-114) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 <= -8.5e+183: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) elif x <= 3.1e-114: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) else: tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= -8.5e+183) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); elseif (x <= 3.1e-114) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 <= -8.5e+183)
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
elseif (x <= 3.1e-114)
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
else
tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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, -8.5e+183], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.1e-114], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $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])\\\\
[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 -8.5 \cdot 10^{+183}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{-114}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
\end{array}
\end{array}
if x < -8.5000000000000004e183Initial program 67.7%
Simplified76.1%
Taylor expanded in x around inf 79.9%
if -8.5000000000000004e183 < x < 3.1e-114Initial program 93.0%
Simplified92.3%
Taylor expanded in x around 0 78.0%
if 3.1e-114 < x Initial program 83.6%
Simplified91.3%
Taylor expanded in t around inf 68.9%
Final simplification75.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (* a (* t -4.0))))
(if (<= a -3.1e+113)
t_1
(if (<= a 4.4e-166)
(* -27.0 (* j k))
(if (<= a 2e-71) (* b c) (if (<= a 2.6e+45) (* j (* k -27.0)) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double tmp;
if (a <= -3.1e+113) {
tmp = t_1;
} else if (a <= 4.4e-166) {
tmp = -27.0 * (j * k);
} else if (a <= 2e-71) {
tmp = b * c;
} else if (a <= 2.6e+45) {
tmp = j * (k * -27.0);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = a * (t * (-4.0d0))
if (a <= (-3.1d+113)) then
tmp = t_1
else if (a <= 4.4d-166) then
tmp = (-27.0d0) * (j * k)
else if (a <= 2d-71) then
tmp = b * c
else if (a <= 2.6d+45) then
tmp = j * (k * (-27.0d0))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = a * (t * -4.0);
double tmp;
if (a <= -3.1e+113) {
tmp = t_1;
} else if (a <= 4.4e-166) {
tmp = -27.0 * (j * k);
} else if (a <= 2e-71) {
tmp = b * c;
} else if (a <= 2.6e+45) {
tmp = j * (k * -27.0);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = a * (t * -4.0) tmp = 0 if a <= -3.1e+113: tmp = t_1 elif a <= 4.4e-166: tmp = -27.0 * (j * k) elif a <= 2e-71: tmp = b * c elif a <= 2.6e+45: tmp = j * (k * -27.0) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(a * Float64(t * -4.0)) tmp = 0.0 if (a <= -3.1e+113) tmp = t_1; elseif (a <= 4.4e-166) tmp = Float64(-27.0 * Float64(j * k)); elseif (a <= 2e-71) tmp = Float64(b * c); elseif (a <= 2.6e+45) tmp = Float64(j * Float64(k * -27.0)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = a * (t * -4.0);
tmp = 0.0;
if (a <= -3.1e+113)
tmp = t_1;
elseif (a <= 4.4e-166)
tmp = -27.0 * (j * k);
elseif (a <= 2e-71)
tmp = b * c;
elseif (a <= 2.6e+45)
tmp = j * (k * -27.0);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.1e+113], t$95$1, If[LessEqual[a, 4.4e-166], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e-71], N[(b * c), $MachinePrecision], If[LessEqual[a, 2.6e+45], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := a \cdot \left(t \cdot -4\right)\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{-166}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-71}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{+45}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.09999999999999991e113 or 2.60000000000000007e45 < a Initial program 82.2%
Simplified87.8%
Taylor expanded in x around -inf 82.9%
Simplified83.9%
Taylor expanded in a around inf 55.9%
*-commutative55.9%
associate-*r*55.9%
Simplified55.9%
if -3.09999999999999991e113 < a < 4.4000000000000002e-166Initial program 89.7%
Simplified90.5%
Taylor expanded in j around inf 32.1%
if 4.4000000000000002e-166 < a < 1.9999999999999998e-71Initial program 89.8%
Simplified94.8%
Taylor expanded in x around -inf 90.0%
Simplified95.2%
Taylor expanded in b around inf 51.2%
if 1.9999999999999998e-71 < a < 2.60000000000000007e45Initial program 100.0%
Simplified99.8%
Taylor expanded in x around -inf 99.8%
Simplified100.0%
Taylor expanded in k around inf 40.3%
associate-*r*40.5%
*-commutative40.5%
associate-*r*40.3%
Simplified40.3%
Final simplification43.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (* a (* t -4.0))))
(if (<= a -6.2e+113)
t_1
(if (<= a 4e-168)
(* -27.0 (* j k))
(if (<= a 2.7e-11) (* 18.0 (* t (* z (* x y)))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double tmp;
if (a <= -6.2e+113) {
tmp = t_1;
} else if (a <= 4e-168) {
tmp = -27.0 * (j * k);
} else if (a <= 2.7e-11) {
tmp = 18.0 * (t * (z * (x * y)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = a * (t * (-4.0d0))
if (a <= (-6.2d+113)) then
tmp = t_1
else if (a <= 4d-168) then
tmp = (-27.0d0) * (j * k)
else if (a <= 2.7d-11) then
tmp = 18.0d0 * (t * (z * (x * y)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = a * (t * -4.0);
double tmp;
if (a <= -6.2e+113) {
tmp = t_1;
} else if (a <= 4e-168) {
tmp = -27.0 * (j * k);
} else if (a <= 2.7e-11) {
tmp = 18.0 * (t * (z * (x * y)));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = a * (t * -4.0) tmp = 0 if a <= -6.2e+113: tmp = t_1 elif a <= 4e-168: tmp = -27.0 * (j * k) elif a <= 2.7e-11: tmp = 18.0 * (t * (z * (x * y))) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(a * Float64(t * -4.0)) tmp = 0.0 if (a <= -6.2e+113) tmp = t_1; elseif (a <= 4e-168) tmp = Float64(-27.0 * Float64(j * k)); elseif (a <= 2.7e-11) tmp = Float64(18.0 * Float64(t * Float64(z * Float64(x * y)))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = a * (t * -4.0);
tmp = 0.0;
if (a <= -6.2e+113)
tmp = t_1;
elseif (a <= 4e-168)
tmp = -27.0 * (j * k);
elseif (a <= 2.7e-11)
tmp = 18.0 * (t * (z * (x * y)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.2e+113], t$95$1, If[LessEqual[a, 4e-168], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e-11], N[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := a \cdot \left(t \cdot -4\right)\\
\mathbf{if}\;a \leq -6.2 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-168}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-11}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.19999999999999982e113 or 2.70000000000000005e-11 < a Initial program 83.7%
Simplified88.9%
Taylor expanded in x around -inf 84.4%
Simplified85.3%
Taylor expanded in a around inf 52.9%
*-commutative52.9%
associate-*r*52.9%
Simplified52.9%
if -6.19999999999999982e113 < a < 4.0000000000000002e-168Initial program 90.4%
Simplified91.2%
Taylor expanded in j around inf 31.7%
if 4.0000000000000002e-168 < a < 2.70000000000000005e-11Initial program 89.9%
Simplified93.2%
Taylor expanded in x around -inf 90.0%
Simplified93.5%
pow193.5%
associate-*l*93.5%
Applied egg-rr93.5%
Taylor expanded in y around inf 37.9%
*-commutative37.9%
*-commutative37.9%
associate-*r*44.4%
Simplified44.4%
Final simplification42.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (* a (* t -4.0))))
(if (<= a -8e+113)
t_1
(if (<= a 3.1e-168)
(* -27.0 (* j k))
(if (<= a 1.8e-13) (* t (* (* 18.0 z) (* x y))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double tmp;
if (a <= -8e+113) {
tmp = t_1;
} else if (a <= 3.1e-168) {
tmp = -27.0 * (j * k);
} else if (a <= 1.8e-13) {
tmp = t * ((18.0 * z) * (x * y));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = a * (t * (-4.0d0))
if (a <= (-8d+113)) then
tmp = t_1
else if (a <= 3.1d-168) then
tmp = (-27.0d0) * (j * k)
else if (a <= 1.8d-13) then
tmp = t * ((18.0d0 * z) * (x * y))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = a * (t * -4.0);
double tmp;
if (a <= -8e+113) {
tmp = t_1;
} else if (a <= 3.1e-168) {
tmp = -27.0 * (j * k);
} else if (a <= 1.8e-13) {
tmp = t * ((18.0 * z) * (x * y));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = a * (t * -4.0) tmp = 0 if a <= -8e+113: tmp = t_1 elif a <= 3.1e-168: tmp = -27.0 * (j * k) elif a <= 1.8e-13: tmp = t * ((18.0 * z) * (x * y)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(a * Float64(t * -4.0)) tmp = 0.0 if (a <= -8e+113) tmp = t_1; elseif (a <= 3.1e-168) tmp = Float64(-27.0 * Float64(j * k)); elseif (a <= 1.8e-13) tmp = Float64(t * Float64(Float64(18.0 * z) * Float64(x * y))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = a * (t * -4.0);
tmp = 0.0;
if (a <= -8e+113)
tmp = t_1;
elseif (a <= 3.1e-168)
tmp = -27.0 * (j * k);
elseif (a <= 1.8e-13)
tmp = t * ((18.0 * z) * (x * y));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8e+113], t$95$1, If[LessEqual[a, 3.1e-168], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.8e-13], N[(t * N[(N[(18.0 * z), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := a \cdot \left(t \cdot -4\right)\\
\mathbf{if}\;a \leq -8 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-168}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-13}:\\
\;\;\;\;t \cdot \left(\left(18 \cdot z\right) \cdot \left(x \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8e113 or 1.7999999999999999e-13 < a Initial program 83.7%
Simplified88.9%
Taylor expanded in x around -inf 84.4%
Simplified85.3%
Taylor expanded in a around inf 52.9%
*-commutative52.9%
associate-*r*52.9%
Simplified52.9%
if -8e113 < a < 3.1e-168Initial program 90.4%
Simplified91.2%
Taylor expanded in j around inf 31.7%
if 3.1e-168 < a < 1.7999999999999999e-13Initial program 89.9%
Simplified93.2%
Taylor expanded in x around -inf 90.0%
Simplified93.5%
Taylor expanded in y around inf 37.9%
*-commutative37.9%
associate-*r*44.4%
associate-*l*44.5%
associate-*l*44.5%
Simplified44.5%
Final simplification42.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.95e+305) (not (<= (* b c) 1.25e+61))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.95e+305) || !((b * c) <= 1.25e+61)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.95d+305)) .or. (.not. ((b * c) <= 1.25d+61))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.95e+305) || !((b * c) <= 1.25e+61)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.95e+305) or not ((b * c) <= 1.25e+61): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.95e+305) || !(Float64(b * c) <= 1.25e+61)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.95e+305) || ~(((b * c) <= 1.25e+61)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.95e+305], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.25e+61]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305} \lor \neg \left(b \cdot c \leq 1.25 \cdot 10^{+61}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.95e305 or 1.25000000000000004e61 < (*.f64 b c) Initial program 83.1%
Simplified87.3%
Taylor expanded in x around -inf 82.9%
Simplified85.8%
Taylor expanded in b around inf 67.0%
if -1.95e305 < (*.f64 b c) < 1.25000000000000004e61Initial program 88.9%
Simplified91.6%
Taylor expanded in j around inf 30.2%
Final simplification40.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.95e+305) (not (<= (* b c) 2.7e+57))) (* 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.95e+305) || !((b * c) <= 2.7e+57)) {
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.95d+305)) .or. (.not. ((b * c) <= 2.7d+57))) 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.95e+305) || !((b * c) <= 2.7e+57)) {
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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.95e+305) or not ((b * c) <= 2.7e+57): 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.95e+305) || !(Float64(b * c) <= 2.7e+57)) tmp = Float64(b * c); else tmp = Float64(j * Float64(k * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.95e+305) || ~(((b * c) <= 2.7e+57)))
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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.95e+305], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2.7e+57]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305} \lor \neg \left(b \cdot c \leq 2.7 \cdot 10^{+57}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.95e305 or 2.6999999999999998e57 < (*.f64 b c) Initial program 83.1%
Simplified87.3%
Taylor expanded in x around -inf 82.9%
Simplified85.8%
Taylor expanded in b around inf 67.0%
if -1.95e305 < (*.f64 b c) < 2.6999999999999998e57Initial program 88.9%
Simplified91.6%
Taylor expanded in x around -inf 89.9%
Simplified89.9%
Taylor expanded in k around inf 30.2%
associate-*r*30.3%
*-commutative30.3%
associate-*r*30.3%
Simplified30.3%
Final simplification40.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.95e+305) (not (<= (* b c) 3.9e+54))) (* b c) (* k (* j -27.0))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.95e+305) || !((b * c) <= 3.9e+54)) {
tmp = b * c;
} else {
tmp = k * (j * -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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.95d+305)) .or. (.not. ((b * c) <= 3.9d+54))) then
tmp = b * c
else
tmp = k * (j * (-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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.95e+305) || !((b * c) <= 3.9e+54)) {
tmp = b * c;
} else {
tmp = k * (j * -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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.95e+305) or not ((b * c) <= 3.9e+54): tmp = b * c else: tmp = k * (j * -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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.95e+305) || !(Float64(b * c) <= 3.9e+54)) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.95e+305) || ~(((b * c) <= 3.9e+54)))
tmp = b * c;
else
tmp = k * (j * -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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.95e+305], N[Not[LessEqual[N[(b * c), $MachinePrecision], 3.9e+54]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305} \lor \neg \left(b \cdot c \leq 3.9 \cdot 10^{+54}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.95e305 or 3.9000000000000003e54 < (*.f64 b c) Initial program 83.1%
Simplified87.3%
Taylor expanded in x around -inf 82.9%
Simplified85.8%
Taylor expanded in b around inf 67.0%
if -1.95e305 < (*.f64 b c) < 3.9000000000000003e54Initial program 88.9%
Simplified91.6%
Taylor expanded in j around inf 30.2%
*-commutative30.2%
*-commutative30.2%
associate-*r*30.3%
Simplified30.3%
Final simplification40.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= a -1e+114) (not (<= a 2.9e+33))) (+ (* b c) (* -4.0 (* t a))) (+ (* 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((a <= -1e+114) || !(a <= 2.9e+33)) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = (j * (k * -27.0)) + (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((a <= (-1d+114)) .or. (.not. (a <= 2.9d+33))) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = (j * (k * (-27.0d0))) + (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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((a <= -1e+114) || !(a <= 2.9e+33)) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = (j * (k * -27.0)) + (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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (a <= -1e+114) or not (a <= 2.9e+33): tmp = (b * c) + (-4.0 * (t * a)) else: tmp = (j * (k * -27.0)) + (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((a <= -1e+114) || !(a <= 2.9e+33)) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((a <= -1e+114) || ~((a <= 2.9e+33)))
tmp = (b * c) + (-4.0 * (t * a));
else
tmp = (j * (k * -27.0)) + (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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[a, -1e+114], N[Not[LessEqual[a, 2.9e+33]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+114} \lor \neg \left(a \leq 2.9 \cdot 10^{+33}\right):\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\end{array}
\end{array}
if a < -1e114 or 2.90000000000000025e33 < a Initial program 82.7%
Simplified86.3%
Taylor expanded in x around 0 73.2%
associate--l+73.2%
*-commutative73.2%
associate-*r*73.2%
fma-define75.1%
*-commutative75.1%
*-commutative75.1%
Applied egg-rr75.1%
Taylor expanded in k around 0 64.3%
if -1e114 < a < 2.90000000000000025e33Initial program 90.8%
Simplified92.0%
Taylor expanded in b around inf 56.3%
Final simplification59.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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);
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.
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;
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]) [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]) 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])){:}
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. 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])\\\\
[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 87.3%
Simplified90.4%
Taylor expanded in x around -inf 88.0%
Simplified88.8%
Taylor expanded in b around inf 23.7%
Final simplification23.7%
(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 2024040
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:herbie-target
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))