
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 -920.0) (not (<= t 1.02e-83)))
(fma
t
(fma -4.0 a (* 18.0 (* z (* x y))))
(fma -27.0 (* j k) (fma -4.0 (* x i) (* b c))))
(-
(+ (* b c) (fma y (* (* t z) (* 18.0 x)) (* t (* a (- 4.0)))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -920.0) || !(t <= 1.02e-83)) {
tmp = fma(t, fma(-4.0, a, (18.0 * (z * (x * y)))), fma(-27.0, (j * k), fma(-4.0, (x * i), (b * c))));
} else {
tmp = ((b * c) + fma(y, ((t * z) * (18.0 * x)), (t * (a * -4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= -920.0) || !(t <= 1.02e-83)) tmp = fma(t, fma(-4.0, a, Float64(18.0 * Float64(z * Float64(x * y)))), fma(-27.0, Float64(j * k), fma(-4.0, Float64(x * i), Float64(b * c)))); else tmp = Float64(Float64(Float64(b * c) + fma(y, Float64(Float64(t * z) * Float64(18.0 * x)), Float64(t * Float64(a * Float64(-4.0))))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 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, -920.0], N[Not[LessEqual[t, 1.02e-83]], $MachinePrecision]], N[(t * N[(-4.0 * a + N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(y * N[(N[(t * z), $MachinePrecision] * N[(18.0 * x), $MachinePrecision]), $MachinePrecision] + N[(t * 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]]
\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 -920 \lor \neg \left(t \leq 1.02 \cdot 10^{-83}\right):\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right), \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(-4, x \cdot i, b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + \mathsf{fma}\left(y, \left(t \cdot z\right) \cdot \left(18 \cdot x\right), t \cdot \left(a \cdot \left(-4\right)\right)\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\end{array}
\end{array}
if t < -920 or 1.0199999999999999e-83 < t Initial program 83.3%
Simplified89.8%
Taylor expanded in t around 0 86.3%
Simplified92.9%
if -920 < t < 1.0199999999999999e-83Initial program 82.8%
Simplified81.0%
associate-*r*82.7%
distribute-rgt-out--82.7%
associate-*l*90.2%
*-commutative90.2%
*-commutative90.2%
Applied egg-rr90.2%
cancel-sign-sub-inv90.2%
associate-*l*94.6%
fma-def94.6%
*-commutative94.6%
*-commutative94.6%
Applied egg-rr94.6%
Final simplification93.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
(if (or (<= t -1.55e+17) (not (<= t 4.2e-83)))
(+
(fma t (fma x (* 18.0 (* z y)) (* -4.0 a)) (fma b c (* x (* -4.0 i))))
(* j (* -27.0 k)))
(-
(+ (* b c) (fma y (* (* t z) (* 18.0 x)) (* t (* a (- 4.0)))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -1.55e+17) || !(t <= 4.2e-83)) {
tmp = fma(t, fma(x, (18.0 * (z * y)), (-4.0 * a)), fma(b, c, (x * (-4.0 * i)))) + (j * (-27.0 * k));
} else {
tmp = ((b * c) + fma(y, ((t * z) * (18.0 * x)), (t * (a * -4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 <= -1.55e+17) || !(t <= 4.2e-83)) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(z * y)), Float64(-4.0 * a)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(-27.0 * k))); else tmp = Float64(Float64(Float64(b * c) + fma(y, Float64(Float64(t * z) * Float64(18.0 * x)), Float64(t * Float64(a * Float64(-4.0))))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 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, -1.55e+17], N[Not[LessEqual[t, 4.2e-83]], $MachinePrecision]], N[(N[(t * N[(x * N[(18.0 * N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(-27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(y * N[(N[(t * z), $MachinePrecision] * N[(18.0 * x), $MachinePrecision]), $MachinePrecision] + N[(t * 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]]
\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 -1.55 \cdot 10^{+17} \lor \neg \left(t \leq 4.2 \cdot 10^{-83}\right):\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\right), -4 \cdot a\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + j \cdot \left(-27 \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + \mathsf{fma}\left(y, \left(t \cdot z\right) \cdot \left(18 \cdot x\right), t \cdot \left(a \cdot \left(-4\right)\right)\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\end{array}
\end{array}
if t < -1.55e17 or 4.1999999999999998e-83 < t Initial program 82.9%
Simplified90.2%
if -1.55e17 < t < 4.1999999999999998e-83Initial program 83.2%
Simplified80.8%
associate-*r*83.2%
distribute-rgt-out--83.2%
associate-*l*89.8%
*-commutative89.8%
*-commutative89.8%
Applied egg-rr89.8%
cancel-sign-sub-inv89.8%
associate-*l*94.1%
fma-def94.1%
*-commutative94.1%
*-commutative94.1%
Applied egg-rr94.1%
Final simplification91.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
(-
(-
(+ (* b c) (- (* t (* z (* y (* 18.0 x)))) (* t (* a 4.0))))
(* i (* x 4.0)))
(* k (* j 27.0)))))
(if (<= t_1 4e+299)
t_1
(if (<= t_1 INFINITY)
(-
(+ (* b c) (fma y (* (* t z) (* 18.0 x)) (* t (* a (- 4.0)))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(* x (- (* 18.0 (* t (* z y))) (* 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 t_1 = (((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= 4e+299) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = ((b * c) + fma(y, ((t * z) * (18.0 * x)), (t * (a * -4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = x * ((18.0 * (t * (z * y))) - (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) t_1 = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(18.0 * x)))) - Float64(t * Float64(a * 4.0)))) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) tmp = 0.0 if (t_1 <= 4e+299) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(Float64(b * c) + fma(y, Float64(Float64(t * z) * Float64(18.0 * x)), Float64(t * Float64(a * Float64(-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(z * y))) - 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_] := Block[{t$95$1 = N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(18.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 4e+299], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(y * N[(N[(t * z), $MachinePrecision] * N[(18.0 * x), $MachinePrecision]), $MachinePrecision] + N[(t * 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[(z * y), $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}
t_1 := \left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(18 \cdot x\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{+299}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\left(b \cdot c + \mathsf{fma}\left(y, \left(t \cdot z\right) \cdot \left(18 \cdot x\right), t \cdot \left(a \cdot \left(-4\right)\right)\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(z \cdot y\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)) < 4.0000000000000002e299Initial program 97.4%
if 4.0000000000000002e299 < (-.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 81.0%
Simplified87.9%
associate-*r*82.3%
distribute-rgt-out--82.3%
associate-*l*88.7%
*-commutative88.7%
*-commutative88.7%
Applied egg-rr88.7%
cancel-sign-sub-inv88.7%
associate-*l*95.9%
fma-def95.9%
*-commutative95.9%
*-commutative95.9%
Applied egg-rr95.9%
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%
Simplified30.8%
Taylor expanded in x around inf 62.1%
Final simplification93.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 (* k (* j 27.0)))
(t_2
(-
(-
(+ (* b c) (- (* t (* z (* y (* 18.0 x)))) (* t (* a 4.0))))
(* i (* x 4.0)))
t_1))
(t_3 (* x (- (* 18.0 (* t (* z y))) (* i 4.0)))))
(if (<= t_2 4e+299)
t_2
(if (<= t_2 INFINITY) (- (- (+ (* b c) t_3) (* 4.0 (* t a))) 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 = k * (j * 27.0);
double t_2 = (((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - t_1;
double t_3 = x * ((18.0 * (t * (z * y))) - (i * 4.0));
double tmp;
if (t_2 <= 4e+299) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = (((b * c) + t_3) - (4.0 * (t * a))) - t_1;
} else {
tmp = t_3;
}
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 t_1 = k * (j * 27.0);
double t_2 = (((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - t_1;
double t_3 = x * ((18.0 * (t * (z * y))) - (i * 4.0));
double tmp;
if (t_2 <= 4e+299) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = (((b * c) + t_3) - (4.0 * (t * a))) - 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 = k * (j * 27.0) t_2 = (((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - t_1 t_3 = x * ((18.0 * (t * (z * y))) - (i * 4.0)) tmp = 0 if t_2 <= 4e+299: tmp = t_2 elif t_2 <= math.inf: tmp = (((b * c) + t_3) - (4.0 * (t * a))) - 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(k * Float64(j * 27.0)) t_2 = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(18.0 * x)))) - Float64(t * Float64(a * 4.0)))) - Float64(i * Float64(x * 4.0))) - t_1) t_3 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 4.0))) tmp = 0.0 if (t_2 <= 4e+299) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(Float64(Float64(Float64(b * c) + t_3) - Float64(4.0 * Float64(t * a))) - 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 = k * (j * 27.0);
t_2 = (((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - t_1;
t_3 = x * ((18.0 * (t * (z * y))) - (i * 4.0));
tmp = 0.0;
if (t_2 <= 4e+299)
tmp = t_2;
elseif (t_2 <= Inf)
tmp = (((b * c) + t_3) - (4.0 * (t * a))) - 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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(18.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 4e+299], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[(N[(N[(b * c), $MachinePrecision] + t$95$3), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], 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 := k \cdot \left(j \cdot 27\right)\\
t_2 := \left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(18 \cdot x\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - i \cdot \left(x \cdot 4\right)\right) - t\_1\\
t_3 := x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\\
\mathbf{if}\;t\_2 \leq 4 \cdot 10^{+299}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\left(\left(b \cdot c + t\_3\right) - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\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)) < 4.0000000000000002e299Initial program 97.4%
if 4.0000000000000002e299 < (-.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 81.0%
Taylor expanded in x around 0 93.3%
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%
Simplified30.8%
Taylor expanded in x around inf 62.1%
Final simplification92.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (* k (* -27.0 j))))
(if (<= (* b c) -1.05e+124)
(* b c)
(if (<= (* b c) -1.75e-45)
(* i (* -4.0 x))
(if (<= (* b c) -1.4e-199)
(* -27.0 (* j k))
(if (<= (* b c) -7.2e-239)
(* 18.0 (* t (* x (* z y))))
(if (<= (* b c) -9.2e-255)
t_2
(if (<= (* b c) 1.75e-249)
t_1
(if (<= (* b c) 1.1e-130)
t_2
(if (<= (* b c) 3.8e-74)
t_1
(if (<= (* b c) 7.4e+83) t_2 (* 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 = a * (t * -4.0);
double t_2 = k * (-27.0 * j);
double tmp;
if ((b * c) <= -1.05e+124) {
tmp = b * c;
} else if ((b * c) <= -1.75e-45) {
tmp = i * (-4.0 * x);
} else if ((b * c) <= -1.4e-199) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= -7.2e-239) {
tmp = 18.0 * (t * (x * (z * y)));
} else if ((b * c) <= -9.2e-255) {
tmp = t_2;
} else if ((b * c) <= 1.75e-249) {
tmp = t_1;
} else if ((b * c) <= 1.1e-130) {
tmp = t_2;
} else if ((b * c) <= 3.8e-74) {
tmp = t_1;
} else if ((b * c) <= 7.4e+83) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = a * (t * (-4.0d0))
t_2 = k * ((-27.0d0) * j)
if ((b * c) <= (-1.05d+124)) then
tmp = b * c
else if ((b * c) <= (-1.75d-45)) then
tmp = i * ((-4.0d0) * x)
else if ((b * c) <= (-1.4d-199)) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= (-7.2d-239)) then
tmp = 18.0d0 * (t * (x * (z * y)))
else if ((b * c) <= (-9.2d-255)) then
tmp = t_2
else if ((b * c) <= 1.75d-249) then
tmp = t_1
else if ((b * c) <= 1.1d-130) then
tmp = t_2
else if ((b * c) <= 3.8d-74) then
tmp = t_1
else if ((b * c) <= 7.4d+83) then
tmp = t_2
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 = a * (t * -4.0);
double t_2 = k * (-27.0 * j);
double tmp;
if ((b * c) <= -1.05e+124) {
tmp = b * c;
} else if ((b * c) <= -1.75e-45) {
tmp = i * (-4.0 * x);
} else if ((b * c) <= -1.4e-199) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= -7.2e-239) {
tmp = 18.0 * (t * (x * (z * y)));
} else if ((b * c) <= -9.2e-255) {
tmp = t_2;
} else if ((b * c) <= 1.75e-249) {
tmp = t_1;
} else if ((b * c) <= 1.1e-130) {
tmp = t_2;
} else if ((b * c) <= 3.8e-74) {
tmp = t_1;
} else if ((b * c) <= 7.4e+83) {
tmp = t_2;
} 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 = a * (t * -4.0) t_2 = k * (-27.0 * j) tmp = 0 if (b * c) <= -1.05e+124: tmp = b * c elif (b * c) <= -1.75e-45: tmp = i * (-4.0 * x) elif (b * c) <= -1.4e-199: tmp = -27.0 * (j * k) elif (b * c) <= -7.2e-239: tmp = 18.0 * (t * (x * (z * y))) elif (b * c) <= -9.2e-255: tmp = t_2 elif (b * c) <= 1.75e-249: tmp = t_1 elif (b * c) <= 1.1e-130: tmp = t_2 elif (b * c) <= 3.8e-74: tmp = t_1 elif (b * c) <= 7.4e+83: tmp = t_2 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(a * Float64(t * -4.0)) t_2 = Float64(k * Float64(-27.0 * j)) tmp = 0.0 if (Float64(b * c) <= -1.05e+124) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.75e-45) tmp = Float64(i * Float64(-4.0 * x)); elseif (Float64(b * c) <= -1.4e-199) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= -7.2e-239) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(z * y)))); elseif (Float64(b * c) <= -9.2e-255) tmp = t_2; elseif (Float64(b * c) <= 1.75e-249) tmp = t_1; elseif (Float64(b * c) <= 1.1e-130) tmp = t_2; elseif (Float64(b * c) <= 3.8e-74) tmp = t_1; elseif (Float64(b * c) <= 7.4e+83) tmp = t_2; 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 = a * (t * -4.0);
t_2 = k * (-27.0 * j);
tmp = 0.0;
if ((b * c) <= -1.05e+124)
tmp = b * c;
elseif ((b * c) <= -1.75e-45)
tmp = i * (-4.0 * x);
elseif ((b * c) <= -1.4e-199)
tmp = -27.0 * (j * k);
elseif ((b * c) <= -7.2e-239)
tmp = 18.0 * (t * (x * (z * y)));
elseif ((b * c) <= -9.2e-255)
tmp = t_2;
elseif ((b * c) <= 1.75e-249)
tmp = t_1;
elseif ((b * c) <= 1.1e-130)
tmp = t_2;
elseif ((b * c) <= 3.8e-74)
tmp = t_1;
elseif ((b * c) <= 7.4e+83)
tmp = t_2;
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[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(-27.0 * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.05e+124], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.75e-45], N[(i * N[(-4.0 * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.4e-199], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -7.2e-239], N[(18.0 * N[(t * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -9.2e-255], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.75e-249], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.1e-130], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 3.8e-74], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 7.4e+83], t$95$2, 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 := a \cdot \left(t \cdot -4\right)\\
t_2 := k \cdot \left(-27 \cdot j\right)\\
\mathbf{if}\;b \cdot c \leq -1.05 \cdot 10^{+124}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.75 \cdot 10^{-45}:\\
\;\;\;\;i \cdot \left(-4 \cdot x\right)\\
\mathbf{elif}\;b \cdot c \leq -1.4 \cdot 10^{-199}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq -7.2 \cdot 10^{-239}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq -9.2 \cdot 10^{-255}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.75 \cdot 10^{-249}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.1 \cdot 10^{-130}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 3.8 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 7.4 \cdot 10^{+83}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.05000000000000006e124 or 7.4000000000000005e83 < (*.f64 b c) Initial program 73.1%
Simplified84.7%
Taylor expanded in t around 0 78.8%
Simplified84.8%
Taylor expanded in b around inf 55.7%
if -1.05000000000000006e124 < (*.f64 b c) < -1.75e-45Initial program 87.9%
Simplified82.7%
Taylor expanded in t around 0 79.8%
Simplified91.0%
Taylor expanded in i around inf 35.5%
*-commutative35.5%
associate-*r*35.5%
Simplified35.5%
if -1.75e-45 < (*.f64 b c) < -1.40000000000000009e-199Initial program 87.1%
Simplified80.6%
Taylor expanded in j around inf 53.9%
if -1.40000000000000009e-199 < (*.f64 b c) < -7.2000000000000002e-239Initial program 87.1%
Simplified99.4%
Taylor expanded in t around 0 99.6%
Simplified99.6%
Taylor expanded in z around inf 75.9%
if -7.2000000000000002e-239 < (*.f64 b c) < -9.1999999999999995e-255 or 1.75000000000000006e-249 < (*.f64 b c) < 1.0999999999999999e-130 or 3.7999999999999996e-74 < (*.f64 b c) < 7.4000000000000005e83Initial program 90.8%
Simplified88.7%
Taylor expanded in j around inf 45.0%
*-commutative45.0%
associate-*r*45.0%
*-commutative45.0%
associate-*l*45.1%
Simplified45.1%
if -9.1999999999999995e-255 < (*.f64 b c) < 1.75000000000000006e-249 or 1.0999999999999999e-130 < (*.f64 b c) < 3.7999999999999996e-74Initial program 86.3%
Simplified88.4%
Taylor expanded in t around 0 88.3%
Simplified89.8%
Taylor expanded in a around inf 38.5%
associate-*r*38.5%
*-commutative38.5%
associate-*l*38.5%
Simplified38.5%
Final simplification47.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 (* j (* -27.0 k)))
(t_2 (+ (* b c) t_1))
(t_3 (* t (- (* 18.0 (* x (* z y))) (* a 4.0))))
(t_4 (* -4.0 (* x i)))
(t_5 (+ (* -27.0 (* j k)) t_4)))
(if (<= (* b c) -4.2e+122)
t_2
(if (<= (* b c) -4e-200)
t_5
(if (<= (* b c) 1.55e-260)
t_3
(if (<= (* b c) 3.25e-118)
t_5
(if (<= (* b c) 0.005)
(- (* -4.0 (* t a)) (* k (* j 27.0)))
(if (<= (* b c) 3.05e+32)
t_5
(if (<= (* b c) 3.5e+97)
t_3
(if (<= (* b c) 9.5e+133) (+ t_1 t_4) 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 * (-27.0 * k);
double t_2 = (b * c) + t_1;
double t_3 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double t_4 = -4.0 * (x * i);
double t_5 = (-27.0 * (j * k)) + t_4;
double tmp;
if ((b * c) <= -4.2e+122) {
tmp = t_2;
} else if ((b * c) <= -4e-200) {
tmp = t_5;
} else if ((b * c) <= 1.55e-260) {
tmp = t_3;
} else if ((b * c) <= 3.25e-118) {
tmp = t_5;
} else if ((b * c) <= 0.005) {
tmp = (-4.0 * (t * a)) - (k * (j * 27.0));
} else if ((b * c) <= 3.05e+32) {
tmp = t_5;
} else if ((b * c) <= 3.5e+97) {
tmp = t_3;
} else if ((b * c) <= 9.5e+133) {
tmp = t_1 + t_4;
} 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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = j * ((-27.0d0) * k)
t_2 = (b * c) + t_1
t_3 = t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0))
t_4 = (-4.0d0) * (x * i)
t_5 = ((-27.0d0) * (j * k)) + t_4
if ((b * c) <= (-4.2d+122)) then
tmp = t_2
else if ((b * c) <= (-4d-200)) then
tmp = t_5
else if ((b * c) <= 1.55d-260) then
tmp = t_3
else if ((b * c) <= 3.25d-118) then
tmp = t_5
else if ((b * c) <= 0.005d0) then
tmp = ((-4.0d0) * (t * a)) - (k * (j * 27.0d0))
else if ((b * c) <= 3.05d+32) then
tmp = t_5
else if ((b * c) <= 3.5d+97) then
tmp = t_3
else if ((b * c) <= 9.5d+133) then
tmp = t_1 + t_4
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 * (-27.0 * k);
double t_2 = (b * c) + t_1;
double t_3 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
double t_4 = -4.0 * (x * i);
double t_5 = (-27.0 * (j * k)) + t_4;
double tmp;
if ((b * c) <= -4.2e+122) {
tmp = t_2;
} else if ((b * c) <= -4e-200) {
tmp = t_5;
} else if ((b * c) <= 1.55e-260) {
tmp = t_3;
} else if ((b * c) <= 3.25e-118) {
tmp = t_5;
} else if ((b * c) <= 0.005) {
tmp = (-4.0 * (t * a)) - (k * (j * 27.0));
} else if ((b * c) <= 3.05e+32) {
tmp = t_5;
} else if ((b * c) <= 3.5e+97) {
tmp = t_3;
} else if ((b * c) <= 9.5e+133) {
tmp = t_1 + t_4;
} 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 * (-27.0 * k) t_2 = (b * c) + t_1 t_3 = t * ((18.0 * (x * (z * y))) - (a * 4.0)) t_4 = -4.0 * (x * i) t_5 = (-27.0 * (j * k)) + t_4 tmp = 0 if (b * c) <= -4.2e+122: tmp = t_2 elif (b * c) <= -4e-200: tmp = t_5 elif (b * c) <= 1.55e-260: tmp = t_3 elif (b * c) <= 3.25e-118: tmp = t_5 elif (b * c) <= 0.005: tmp = (-4.0 * (t * a)) - (k * (j * 27.0)) elif (b * c) <= 3.05e+32: tmp = t_5 elif (b * c) <= 3.5e+97: tmp = t_3 elif (b * c) <= 9.5e+133: tmp = t_1 + t_4 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(-27.0 * k)) t_2 = Float64(Float64(b * c) + t_1) t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0))) t_4 = Float64(-4.0 * Float64(x * i)) t_5 = Float64(Float64(-27.0 * Float64(j * k)) + t_4) tmp = 0.0 if (Float64(b * c) <= -4.2e+122) tmp = t_2; elseif (Float64(b * c) <= -4e-200) tmp = t_5; elseif (Float64(b * c) <= 1.55e-260) tmp = t_3; elseif (Float64(b * c) <= 3.25e-118) tmp = t_5; elseif (Float64(b * c) <= 0.005) tmp = Float64(Float64(-4.0 * Float64(t * a)) - Float64(k * Float64(j * 27.0))); elseif (Float64(b * c) <= 3.05e+32) tmp = t_5; elseif (Float64(b * c) <= 3.5e+97) tmp = t_3; elseif (Float64(b * c) <= 9.5e+133) tmp = Float64(t_1 + t_4); 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 * (-27.0 * k);
t_2 = (b * c) + t_1;
t_3 = t * ((18.0 * (x * (z * y))) - (a * 4.0));
t_4 = -4.0 * (x * i);
t_5 = (-27.0 * (j * k)) + t_4;
tmp = 0.0;
if ((b * c) <= -4.2e+122)
tmp = t_2;
elseif ((b * c) <= -4e-200)
tmp = t_5;
elseif ((b * c) <= 1.55e-260)
tmp = t_3;
elseif ((b * c) <= 3.25e-118)
tmp = t_5;
elseif ((b * c) <= 0.005)
tmp = (-4.0 * (t * a)) - (k * (j * 27.0));
elseif ((b * c) <= 3.05e+32)
tmp = t_5;
elseif ((b * c) <= 3.5e+97)
tmp = t_3;
elseif ((b * c) <= 9.5e+133)
tmp = t_1 + t_4;
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[(-27.0 * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -4.2e+122], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -4e-200], t$95$5, If[LessEqual[N[(b * c), $MachinePrecision], 1.55e-260], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 3.25e-118], t$95$5, If[LessEqual[N[(b * c), $MachinePrecision], 0.005], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.05e+32], t$95$5, If[LessEqual[N[(b * c), $MachinePrecision], 3.5e+97], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 9.5e+133], N[(t$95$1 + t$95$4), $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(-27 \cdot k\right)\\
t_2 := b \cdot c + t\_1\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\
t_4 := -4 \cdot \left(x \cdot i\right)\\
t_5 := -27 \cdot \left(j \cdot k\right) + t\_4\\
\mathbf{if}\;b \cdot c \leq -4.2 \cdot 10^{+122}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -4 \cdot 10^{-200}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;b \cdot c \leq 1.55 \cdot 10^{-260}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \cdot c \leq 3.25 \cdot 10^{-118}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;b \cdot c \leq 0.005:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;b \cdot c \leq 3.05 \cdot 10^{+32}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;b \cdot c \leq 3.5 \cdot 10^{+97}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \cdot c \leq 9.5 \cdot 10^{+133}:\\
\;\;\;\;t\_1 + t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 b c) < -4.20000000000000032e122 or 9.49999999999999996e133 < (*.f64 b c) Initial program 76.0%
Simplified86.7%
Taylor expanded in b around inf 69.4%
if -4.20000000000000032e122 < (*.f64 b c) < -3.9999999999999999e-200 or 1.54999999999999991e-260 < (*.f64 b c) < 3.24999999999999979e-118 or 0.0050000000000000001 < (*.f64 b c) < 3.05000000000000014e32Initial program 87.3%
Simplified81.2%
Taylor expanded in i around inf 63.7%
Taylor expanded in i around 0 65.9%
if -3.9999999999999999e-200 < (*.f64 b c) < 1.54999999999999991e-260 or 3.05000000000000014e32 < (*.f64 b c) < 3.5000000000000001e97Initial program 85.9%
Simplified92.5%
associate-*r*89.1%
distribute-rgt-out--86.0%
associate-*l*83.0%
*-commutative83.0%
*-commutative83.0%
Applied egg-rr83.0%
Taylor expanded in t around inf 59.3%
if 3.24999999999999979e-118 < (*.f64 b c) < 0.0050000000000000001Initial program 94.4%
Taylor expanded in x around 0 88.7%
Taylor expanded in a around inf 67.7%
*-commutative67.7%
Simplified67.7%
if 3.5000000000000001e97 < (*.f64 b c) < 9.49999999999999996e133Initial program 52.0%
Simplified63.3%
Taylor expanded in i around inf 64.2%
Final simplification65.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 (* a (* t -4.0))) (t_2 (* k (* -27.0 j))))
(if (<= (* b c) -9e+122)
(* b c)
(if (<= (* b c) -1.5e-46)
(* i (* -4.0 x))
(if (<= (* b c) -1.26e-253)
(* -27.0 (* j k))
(if (<= (* b c) 9.2e-250)
t_1
(if (<= (* b c) 1.32e-130)
t_2
(if (<= (* b c) 2.6e-75)
t_1
(if (<= (* b c) 4.05e+93) t_2 (* 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 = a * (t * -4.0);
double t_2 = k * (-27.0 * j);
double tmp;
if ((b * c) <= -9e+122) {
tmp = b * c;
} else if ((b * c) <= -1.5e-46) {
tmp = i * (-4.0 * x);
} else if ((b * c) <= -1.26e-253) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 9.2e-250) {
tmp = t_1;
} else if ((b * c) <= 1.32e-130) {
tmp = t_2;
} else if ((b * c) <= 2.6e-75) {
tmp = t_1;
} else if ((b * c) <= 4.05e+93) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = a * (t * (-4.0d0))
t_2 = k * ((-27.0d0) * j)
if ((b * c) <= (-9d+122)) then
tmp = b * c
else if ((b * c) <= (-1.5d-46)) then
tmp = i * ((-4.0d0) * x)
else if ((b * c) <= (-1.26d-253)) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 9.2d-250) then
tmp = t_1
else if ((b * c) <= 1.32d-130) then
tmp = t_2
else if ((b * c) <= 2.6d-75) then
tmp = t_1
else if ((b * c) <= 4.05d+93) then
tmp = t_2
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 = a * (t * -4.0);
double t_2 = k * (-27.0 * j);
double tmp;
if ((b * c) <= -9e+122) {
tmp = b * c;
} else if ((b * c) <= -1.5e-46) {
tmp = i * (-4.0 * x);
} else if ((b * c) <= -1.26e-253) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 9.2e-250) {
tmp = t_1;
} else if ((b * c) <= 1.32e-130) {
tmp = t_2;
} else if ((b * c) <= 2.6e-75) {
tmp = t_1;
} else if ((b * c) <= 4.05e+93) {
tmp = t_2;
} 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 = a * (t * -4.0) t_2 = k * (-27.0 * j) tmp = 0 if (b * c) <= -9e+122: tmp = b * c elif (b * c) <= -1.5e-46: tmp = i * (-4.0 * x) elif (b * c) <= -1.26e-253: tmp = -27.0 * (j * k) elif (b * c) <= 9.2e-250: tmp = t_1 elif (b * c) <= 1.32e-130: tmp = t_2 elif (b * c) <= 2.6e-75: tmp = t_1 elif (b * c) <= 4.05e+93: tmp = t_2 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(a * Float64(t * -4.0)) t_2 = Float64(k * Float64(-27.0 * j)) tmp = 0.0 if (Float64(b * c) <= -9e+122) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.5e-46) tmp = Float64(i * Float64(-4.0 * x)); elseif (Float64(b * c) <= -1.26e-253) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 9.2e-250) tmp = t_1; elseif (Float64(b * c) <= 1.32e-130) tmp = t_2; elseif (Float64(b * c) <= 2.6e-75) tmp = t_1; elseif (Float64(b * c) <= 4.05e+93) tmp = t_2; 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 = a * (t * -4.0);
t_2 = k * (-27.0 * j);
tmp = 0.0;
if ((b * c) <= -9e+122)
tmp = b * c;
elseif ((b * c) <= -1.5e-46)
tmp = i * (-4.0 * x);
elseif ((b * c) <= -1.26e-253)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 9.2e-250)
tmp = t_1;
elseif ((b * c) <= 1.32e-130)
tmp = t_2;
elseif ((b * c) <= 2.6e-75)
tmp = t_1;
elseif ((b * c) <= 4.05e+93)
tmp = t_2;
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[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(-27.0 * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -9e+122], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.5e-46], N[(i * N[(-4.0 * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.26e-253], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9.2e-250], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.32e-130], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 2.6e-75], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 4.05e+93], t$95$2, 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 := a \cdot \left(t \cdot -4\right)\\
t_2 := k \cdot \left(-27 \cdot j\right)\\
\mathbf{if}\;b \cdot c \leq -9 \cdot 10^{+122}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.5 \cdot 10^{-46}:\\
\;\;\;\;i \cdot \left(-4 \cdot x\right)\\
\mathbf{elif}\;b \cdot c \leq -1.26 \cdot 10^{-253}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 9.2 \cdot 10^{-250}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.32 \cdot 10^{-130}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 2.6 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 4.05 \cdot 10^{+93}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -8.99999999999999995e122 or 4.04999999999999992e93 < (*.f64 b c) Initial program 73.1%
Simplified84.7%
Taylor expanded in t around 0 78.8%
Simplified84.8%
Taylor expanded in b around inf 55.7%
if -8.99999999999999995e122 < (*.f64 b c) < -1.49999999999999994e-46Initial program 87.9%
Simplified82.7%
Taylor expanded in t around 0 79.8%
Simplified91.0%
Taylor expanded in i around inf 35.5%
*-commutative35.5%
associate-*r*35.5%
Simplified35.5%
if -1.49999999999999994e-46 < (*.f64 b c) < -1.2600000000000001e-253Initial program 88.0%
Simplified85.7%
Taylor expanded in j around inf 48.5%
if -1.2600000000000001e-253 < (*.f64 b c) < 9.1999999999999998e-250 or 1.3200000000000001e-130 < (*.f64 b c) < 2.6e-75Initial program 86.3%
Simplified88.4%
Taylor expanded in t around 0 88.3%
Simplified89.8%
Taylor expanded in a around inf 38.5%
associate-*r*38.5%
*-commutative38.5%
associate-*l*38.5%
Simplified38.5%
if 9.1999999999999998e-250 < (*.f64 b c) < 1.3200000000000001e-130 or 2.6e-75 < (*.f64 b c) < 4.04999999999999992e93Initial program 90.2%
Simplified87.9%
Taylor expanded in j around inf 42.2%
*-commutative42.2%
associate-*r*42.2%
*-commutative42.2%
associate-*l*42.3%
Simplified42.3%
Final simplification46.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 (* -27.0 k)))
(t_2 (+ (* b c) t_1))
(t_3 (+ t_1 (* -4.0 (* t a))))
(t_4 (* -4.0 (* x i)))
(t_5 (+ (* -27.0 (* j k)) t_4)))
(if (<= (* b c) -7e+122)
t_2
(if (<= (* b c) -7.2e-157)
t_5
(if (<= (* b c) 5.1e-281)
t_3
(if (<= (* b c) 3.4e-118)
t_5
(if (<= (* b c) 2.9e-12)
t_3
(if (<= (* b c) 2.7e+134) (+ t_1 t_4) 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 * (-27.0 * k);
double t_2 = (b * c) + t_1;
double t_3 = t_1 + (-4.0 * (t * a));
double t_4 = -4.0 * (x * i);
double t_5 = (-27.0 * (j * k)) + t_4;
double tmp;
if ((b * c) <= -7e+122) {
tmp = t_2;
} else if ((b * c) <= -7.2e-157) {
tmp = t_5;
} else if ((b * c) <= 5.1e-281) {
tmp = t_3;
} else if ((b * c) <= 3.4e-118) {
tmp = t_5;
} else if ((b * c) <= 2.9e-12) {
tmp = t_3;
} else if ((b * c) <= 2.7e+134) {
tmp = t_1 + t_4;
} 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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = j * ((-27.0d0) * k)
t_2 = (b * c) + t_1
t_3 = t_1 + ((-4.0d0) * (t * a))
t_4 = (-4.0d0) * (x * i)
t_5 = ((-27.0d0) * (j * k)) + t_4
if ((b * c) <= (-7d+122)) then
tmp = t_2
else if ((b * c) <= (-7.2d-157)) then
tmp = t_5
else if ((b * c) <= 5.1d-281) then
tmp = t_3
else if ((b * c) <= 3.4d-118) then
tmp = t_5
else if ((b * c) <= 2.9d-12) then
tmp = t_3
else if ((b * c) <= 2.7d+134) then
tmp = t_1 + t_4
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 * (-27.0 * k);
double t_2 = (b * c) + t_1;
double t_3 = t_1 + (-4.0 * (t * a));
double t_4 = -4.0 * (x * i);
double t_5 = (-27.0 * (j * k)) + t_4;
double tmp;
if ((b * c) <= -7e+122) {
tmp = t_2;
} else if ((b * c) <= -7.2e-157) {
tmp = t_5;
} else if ((b * c) <= 5.1e-281) {
tmp = t_3;
} else if ((b * c) <= 3.4e-118) {
tmp = t_5;
} else if ((b * c) <= 2.9e-12) {
tmp = t_3;
} else if ((b * c) <= 2.7e+134) {
tmp = t_1 + t_4;
} 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 * (-27.0 * k) t_2 = (b * c) + t_1 t_3 = t_1 + (-4.0 * (t * a)) t_4 = -4.0 * (x * i) t_5 = (-27.0 * (j * k)) + t_4 tmp = 0 if (b * c) <= -7e+122: tmp = t_2 elif (b * c) <= -7.2e-157: tmp = t_5 elif (b * c) <= 5.1e-281: tmp = t_3 elif (b * c) <= 3.4e-118: tmp = t_5 elif (b * c) <= 2.9e-12: tmp = t_3 elif (b * c) <= 2.7e+134: tmp = t_1 + t_4 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(-27.0 * k)) t_2 = Float64(Float64(b * c) + t_1) t_3 = Float64(t_1 + Float64(-4.0 * Float64(t * a))) t_4 = Float64(-4.0 * Float64(x * i)) t_5 = Float64(Float64(-27.0 * Float64(j * k)) + t_4) tmp = 0.0 if (Float64(b * c) <= -7e+122) tmp = t_2; elseif (Float64(b * c) <= -7.2e-157) tmp = t_5; elseif (Float64(b * c) <= 5.1e-281) tmp = t_3; elseif (Float64(b * c) <= 3.4e-118) tmp = t_5; elseif (Float64(b * c) <= 2.9e-12) tmp = t_3; elseif (Float64(b * c) <= 2.7e+134) tmp = Float64(t_1 + t_4); 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 * (-27.0 * k);
t_2 = (b * c) + t_1;
t_3 = t_1 + (-4.0 * (t * a));
t_4 = -4.0 * (x * i);
t_5 = (-27.0 * (j * k)) + t_4;
tmp = 0.0;
if ((b * c) <= -7e+122)
tmp = t_2;
elseif ((b * c) <= -7.2e-157)
tmp = t_5;
elseif ((b * c) <= 5.1e-281)
tmp = t_3;
elseif ((b * c) <= 3.4e-118)
tmp = t_5;
elseif ((b * c) <= 2.9e-12)
tmp = t_3;
elseif ((b * c) <= 2.7e+134)
tmp = t_1 + t_4;
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[(-27.0 * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -7e+122], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -7.2e-157], t$95$5, If[LessEqual[N[(b * c), $MachinePrecision], 5.1e-281], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 3.4e-118], t$95$5, If[LessEqual[N[(b * c), $MachinePrecision], 2.9e-12], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 2.7e+134], N[(t$95$1 + t$95$4), $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(-27 \cdot k\right)\\
t_2 := b \cdot c + t\_1\\
t_3 := t\_1 + -4 \cdot \left(t \cdot a\right)\\
t_4 := -4 \cdot \left(x \cdot i\right)\\
t_5 := -27 \cdot \left(j \cdot k\right) + t\_4\\
\mathbf{if}\;b \cdot c \leq -7 \cdot 10^{+122}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -7.2 \cdot 10^{-157}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;b \cdot c \leq 5.1 \cdot 10^{-281}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \cdot c \leq 3.4 \cdot 10^{-118}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;b \cdot c \leq 2.9 \cdot 10^{-12}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \cdot c \leq 2.7 \cdot 10^{+134}:\\
\;\;\;\;t\_1 + t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 b c) < -7.00000000000000028e122 or 2.7e134 < (*.f64 b c) Initial program 76.0%
Simplified86.7%
Taylor expanded in b around inf 69.4%
if -7.00000000000000028e122 < (*.f64 b c) < -7.2e-157 or 5.10000000000000025e-281 < (*.f64 b c) < 3.39999999999999991e-118Initial program 84.7%
Simplified81.5%
Taylor expanded in i around inf 62.2%
Taylor expanded in i around 0 64.7%
if -7.2e-157 < (*.f64 b c) < 5.10000000000000025e-281 or 3.39999999999999991e-118 < (*.f64 b c) < 2.9000000000000002e-12Initial program 90.4%
Simplified90.8%
Taylor expanded in a around inf 57.2%
*-commutative57.2%
Simplified57.2%
if 2.9000000000000002e-12 < (*.f64 b c) < 2.7e134Initial program 76.7%
Simplified84.3%
Taylor expanded in i around inf 49.4%
Final simplification62.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 (* -27.0 k)))
(t_2 (+ (* b c) t_1))
(t_3 (- (* -4.0 (* t a)) (* k (* j 27.0))))
(t_4 (* -4.0 (* x i)))
(t_5 (+ (* -27.0 (* j k)) t_4)))
(if (<= (* b c) -3.8e+123)
t_2
(if (<= (* b c) -4.5e-156)
t_5
(if (<= (* b c) 1.65e-286)
t_3
(if (<= (* b c) 3.8e-118)
t_5
(if (<= (* b c) 7e-11)
t_3
(if (<= (* b c) 1.62e+133) (+ t_1 t_4) 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 * (-27.0 * k);
double t_2 = (b * c) + t_1;
double t_3 = (-4.0 * (t * a)) - (k * (j * 27.0));
double t_4 = -4.0 * (x * i);
double t_5 = (-27.0 * (j * k)) + t_4;
double tmp;
if ((b * c) <= -3.8e+123) {
tmp = t_2;
} else if ((b * c) <= -4.5e-156) {
tmp = t_5;
} else if ((b * c) <= 1.65e-286) {
tmp = t_3;
} else if ((b * c) <= 3.8e-118) {
tmp = t_5;
} else if ((b * c) <= 7e-11) {
tmp = t_3;
} else if ((b * c) <= 1.62e+133) {
tmp = t_1 + t_4;
} 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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = j * ((-27.0d0) * k)
t_2 = (b * c) + t_1
t_3 = ((-4.0d0) * (t * a)) - (k * (j * 27.0d0))
t_4 = (-4.0d0) * (x * i)
t_5 = ((-27.0d0) * (j * k)) + t_4
if ((b * c) <= (-3.8d+123)) then
tmp = t_2
else if ((b * c) <= (-4.5d-156)) then
tmp = t_5
else if ((b * c) <= 1.65d-286) then
tmp = t_3
else if ((b * c) <= 3.8d-118) then
tmp = t_5
else if ((b * c) <= 7d-11) then
tmp = t_3
else if ((b * c) <= 1.62d+133) then
tmp = t_1 + t_4
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 * (-27.0 * k);
double t_2 = (b * c) + t_1;
double t_3 = (-4.0 * (t * a)) - (k * (j * 27.0));
double t_4 = -4.0 * (x * i);
double t_5 = (-27.0 * (j * k)) + t_4;
double tmp;
if ((b * c) <= -3.8e+123) {
tmp = t_2;
} else if ((b * c) <= -4.5e-156) {
tmp = t_5;
} else if ((b * c) <= 1.65e-286) {
tmp = t_3;
} else if ((b * c) <= 3.8e-118) {
tmp = t_5;
} else if ((b * c) <= 7e-11) {
tmp = t_3;
} else if ((b * c) <= 1.62e+133) {
tmp = t_1 + t_4;
} 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 * (-27.0 * k) t_2 = (b * c) + t_1 t_3 = (-4.0 * (t * a)) - (k * (j * 27.0)) t_4 = -4.0 * (x * i) t_5 = (-27.0 * (j * k)) + t_4 tmp = 0 if (b * c) <= -3.8e+123: tmp = t_2 elif (b * c) <= -4.5e-156: tmp = t_5 elif (b * c) <= 1.65e-286: tmp = t_3 elif (b * c) <= 3.8e-118: tmp = t_5 elif (b * c) <= 7e-11: tmp = t_3 elif (b * c) <= 1.62e+133: tmp = t_1 + t_4 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(-27.0 * k)) t_2 = Float64(Float64(b * c) + t_1) t_3 = Float64(Float64(-4.0 * Float64(t * a)) - Float64(k * Float64(j * 27.0))) t_4 = Float64(-4.0 * Float64(x * i)) t_5 = Float64(Float64(-27.0 * Float64(j * k)) + t_4) tmp = 0.0 if (Float64(b * c) <= -3.8e+123) tmp = t_2; elseif (Float64(b * c) <= -4.5e-156) tmp = t_5; elseif (Float64(b * c) <= 1.65e-286) tmp = t_3; elseif (Float64(b * c) <= 3.8e-118) tmp = t_5; elseif (Float64(b * c) <= 7e-11) tmp = t_3; elseif (Float64(b * c) <= 1.62e+133) tmp = Float64(t_1 + t_4); 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 * (-27.0 * k);
t_2 = (b * c) + t_1;
t_3 = (-4.0 * (t * a)) - (k * (j * 27.0));
t_4 = -4.0 * (x * i);
t_5 = (-27.0 * (j * k)) + t_4;
tmp = 0.0;
if ((b * c) <= -3.8e+123)
tmp = t_2;
elseif ((b * c) <= -4.5e-156)
tmp = t_5;
elseif ((b * c) <= 1.65e-286)
tmp = t_3;
elseif ((b * c) <= 3.8e-118)
tmp = t_5;
elseif ((b * c) <= 7e-11)
tmp = t_3;
elseif ((b * c) <= 1.62e+133)
tmp = t_1 + t_4;
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[(-27.0 * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.8e+123], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -4.5e-156], t$95$5, If[LessEqual[N[(b * c), $MachinePrecision], 1.65e-286], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 3.8e-118], t$95$5, If[LessEqual[N[(b * c), $MachinePrecision], 7e-11], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 1.62e+133], N[(t$95$1 + t$95$4), $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(-27 \cdot k\right)\\
t_2 := b \cdot c + t\_1\\
t_3 := -4 \cdot \left(t \cdot a\right) - k \cdot \left(j \cdot 27\right)\\
t_4 := -4 \cdot \left(x \cdot i\right)\\
t_5 := -27 \cdot \left(j \cdot k\right) + t\_4\\
\mathbf{if}\;b \cdot c \leq -3.8 \cdot 10^{+123}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -4.5 \cdot 10^{-156}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;b \cdot c \leq 1.65 \cdot 10^{-286}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \cdot c \leq 3.8 \cdot 10^{-118}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;b \cdot c \leq 7 \cdot 10^{-11}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \cdot c \leq 1.62 \cdot 10^{+133}:\\
\;\;\;\;t\_1 + t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 b c) < -3.79999999999999994e123 or 1.61999999999999998e133 < (*.f64 b c) Initial program 76.0%
Simplified86.7%
Taylor expanded in b around inf 69.4%
if -3.79999999999999994e123 < (*.f64 b c) < -4.49999999999999986e-156 or 1.6499999999999999e-286 < (*.f64 b c) < 3.8000000000000001e-118Initial program 84.7%
Simplified81.5%
Taylor expanded in i around inf 62.2%
Taylor expanded in i around 0 64.7%
if -4.49999999999999986e-156 < (*.f64 b c) < 1.6499999999999999e-286 or 3.8000000000000001e-118 < (*.f64 b c) < 7.00000000000000038e-11Initial program 90.4%
Taylor expanded in x around 0 90.6%
Taylor expanded in a around inf 58.4%
*-commutative58.4%
Simplified58.4%
if 7.00000000000000038e-11 < (*.f64 b c) < 1.61999999999999998e133Initial program 76.7%
Simplified84.3%
Taylor expanded in i around inf 49.4%
Final simplification62.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
(let* ((t_1 (* -27.0 (* j k))) (t_2 (* a (* t -4.0))))
(if (<= (* b c) -3.8e+178)
(* b c)
(if (<= (* b c) -3.7e-255)
t_1
(if (<= (* b c) 1.05e-249)
t_2
(if (<= (* b c) 1.3e-130)
t_1
(if (<= (* b c) 2.1e-74)
t_2
(if (<= (* b c) 4.9e+92) 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 = -27.0 * (j * k);
double t_2 = a * (t * -4.0);
double tmp;
if ((b * c) <= -3.8e+178) {
tmp = b * c;
} else if ((b * c) <= -3.7e-255) {
tmp = t_1;
} else if ((b * c) <= 1.05e-249) {
tmp = t_2;
} else if ((b * c) <= 1.3e-130) {
tmp = t_1;
} else if ((b * c) <= 2.1e-74) {
tmp = t_2;
} else if ((b * c) <= 4.9e+92) {
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) :: t_2
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
t_2 = a * (t * (-4.0d0))
if ((b * c) <= (-3.8d+178)) then
tmp = b * c
else if ((b * c) <= (-3.7d-255)) then
tmp = t_1
else if ((b * c) <= 1.05d-249) then
tmp = t_2
else if ((b * c) <= 1.3d-130) then
tmp = t_1
else if ((b * c) <= 2.1d-74) then
tmp = t_2
else if ((b * c) <= 4.9d+92) 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 = -27.0 * (j * k);
double t_2 = a * (t * -4.0);
double tmp;
if ((b * c) <= -3.8e+178) {
tmp = b * c;
} else if ((b * c) <= -3.7e-255) {
tmp = t_1;
} else if ((b * c) <= 1.05e-249) {
tmp = t_2;
} else if ((b * c) <= 1.3e-130) {
tmp = t_1;
} else if ((b * c) <= 2.1e-74) {
tmp = t_2;
} else if ((b * c) <= 4.9e+92) {
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 = -27.0 * (j * k) t_2 = a * (t * -4.0) tmp = 0 if (b * c) <= -3.8e+178: tmp = b * c elif (b * c) <= -3.7e-255: tmp = t_1 elif (b * c) <= 1.05e-249: tmp = t_2 elif (b * c) <= 1.3e-130: tmp = t_1 elif (b * c) <= 2.1e-74: tmp = t_2 elif (b * c) <= 4.9e+92: 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(-27.0 * Float64(j * k)) t_2 = Float64(a * Float64(t * -4.0)) tmp = 0.0 if (Float64(b * c) <= -3.8e+178) tmp = Float64(b * c); elseif (Float64(b * c) <= -3.7e-255) tmp = t_1; elseif (Float64(b * c) <= 1.05e-249) tmp = t_2; elseif (Float64(b * c) <= 1.3e-130) tmp = t_1; elseif (Float64(b * c) <= 2.1e-74) tmp = t_2; elseif (Float64(b * c) <= 4.9e+92) 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 = -27.0 * (j * k);
t_2 = a * (t * -4.0);
tmp = 0.0;
if ((b * c) <= -3.8e+178)
tmp = b * c;
elseif ((b * c) <= -3.7e-255)
tmp = t_1;
elseif ((b * c) <= 1.05e-249)
tmp = t_2;
elseif ((b * c) <= 1.3e-130)
tmp = t_1;
elseif ((b * c) <= 2.1e-74)
tmp = t_2;
elseif ((b * c) <= 4.9e+92)
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[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.8e+178], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.7e-255], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.05e-249], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.3e-130], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2.1e-74], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 4.9e+92], 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 := -27 \cdot \left(j \cdot k\right)\\
t_2 := a \cdot \left(t \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -3.8 \cdot 10^{+178}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -3.7 \cdot 10^{-255}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.05 \cdot 10^{-249}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.3 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 2.1 \cdot 10^{-74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 4.9 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.79999999999999998e178 or 4.9000000000000002e92 < (*.f64 b c) Initial program 74.5%
Simplified85.9%
Taylor expanded in t around 0 79.4%
Simplified85.9%
Taylor expanded in b around inf 58.1%
if -3.79999999999999998e178 < (*.f64 b c) < -3.7000000000000002e-255 or 1.04999999999999996e-249 < (*.f64 b c) < 1.3e-130 or 2.1e-74 < (*.f64 b c) < 4.9000000000000002e92Initial program 87.0%
Simplified84.8%
Taylor expanded in j around inf 38.3%
if -3.7000000000000002e-255 < (*.f64 b c) < 1.04999999999999996e-249 or 1.3e-130 < (*.f64 b c) < 2.1e-74Initial program 86.3%
Simplified88.4%
Taylor expanded in t around 0 88.3%
Simplified89.8%
Taylor expanded in a around inf 38.5%
associate-*r*38.5%
*-commutative38.5%
associate-*l*38.5%
Simplified38.5%
Final simplification44.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 (* k (* -27.0 j))) (t_2 (* a (* t -4.0))))
(if (<= (* b c) -8.8e+178)
(* b c)
(if (<= (* b c) -3.8e-253)
(* -27.0 (* j k))
(if (<= (* b c) 9.2e-250)
t_2
(if (<= (* b c) 1.2e-130)
t_1
(if (<= (* b c) 3.8e-74)
t_2
(if (<= (* b c) 1.26e+91) 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 = k * (-27.0 * j);
double t_2 = a * (t * -4.0);
double tmp;
if ((b * c) <= -8.8e+178) {
tmp = b * c;
} else if ((b * c) <= -3.8e-253) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 9.2e-250) {
tmp = t_2;
} else if ((b * c) <= 1.2e-130) {
tmp = t_1;
} else if ((b * c) <= 3.8e-74) {
tmp = t_2;
} else if ((b * c) <= 1.26e+91) {
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) :: t_2
real(8) :: tmp
t_1 = k * ((-27.0d0) * j)
t_2 = a * (t * (-4.0d0))
if ((b * c) <= (-8.8d+178)) then
tmp = b * c
else if ((b * c) <= (-3.8d-253)) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 9.2d-250) then
tmp = t_2
else if ((b * c) <= 1.2d-130) then
tmp = t_1
else if ((b * c) <= 3.8d-74) then
tmp = t_2
else if ((b * c) <= 1.26d+91) 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 = k * (-27.0 * j);
double t_2 = a * (t * -4.0);
double tmp;
if ((b * c) <= -8.8e+178) {
tmp = b * c;
} else if ((b * c) <= -3.8e-253) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 9.2e-250) {
tmp = t_2;
} else if ((b * c) <= 1.2e-130) {
tmp = t_1;
} else if ((b * c) <= 3.8e-74) {
tmp = t_2;
} else if ((b * c) <= 1.26e+91) {
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 = k * (-27.0 * j) t_2 = a * (t * -4.0) tmp = 0 if (b * c) <= -8.8e+178: tmp = b * c elif (b * c) <= -3.8e-253: tmp = -27.0 * (j * k) elif (b * c) <= 9.2e-250: tmp = t_2 elif (b * c) <= 1.2e-130: tmp = t_1 elif (b * c) <= 3.8e-74: tmp = t_2 elif (b * c) <= 1.26e+91: 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(k * Float64(-27.0 * j)) t_2 = Float64(a * Float64(t * -4.0)) tmp = 0.0 if (Float64(b * c) <= -8.8e+178) tmp = Float64(b * c); elseif (Float64(b * c) <= -3.8e-253) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 9.2e-250) tmp = t_2; elseif (Float64(b * c) <= 1.2e-130) tmp = t_1; elseif (Float64(b * c) <= 3.8e-74) tmp = t_2; elseif (Float64(b * c) <= 1.26e+91) 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 = k * (-27.0 * j);
t_2 = a * (t * -4.0);
tmp = 0.0;
if ((b * c) <= -8.8e+178)
tmp = b * c;
elseif ((b * c) <= -3.8e-253)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 9.2e-250)
tmp = t_2;
elseif ((b * c) <= 1.2e-130)
tmp = t_1;
elseif ((b * c) <= 3.8e-74)
tmp = t_2;
elseif ((b * c) <= 1.26e+91)
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[(k * N[(-27.0 * j), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -8.8e+178], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.8e-253], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9.2e-250], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.2e-130], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 3.8e-74], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.26e+91], 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 := k \cdot \left(-27 \cdot j\right)\\
t_2 := a \cdot \left(t \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -8.8 \cdot 10^{+178}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -3.8 \cdot 10^{-253}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 9.2 \cdot 10^{-250}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.2 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 3.8 \cdot 10^{-74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.26 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -8.79999999999999989e178 or 1.26e91 < (*.f64 b c) Initial program 74.5%
Simplified85.9%
Taylor expanded in t around 0 79.4%
Simplified85.9%
Taylor expanded in b around inf 58.1%
if -8.79999999999999989e178 < (*.f64 b c) < -3.80000000000000012e-253Initial program 85.4%
Simplified83.3%
Taylor expanded in j around inf 36.3%
if -3.80000000000000012e-253 < (*.f64 b c) < 9.1999999999999998e-250 or 1.19999999999999998e-130 < (*.f64 b c) < 3.7999999999999996e-74Initial program 86.3%
Simplified88.4%
Taylor expanded in t around 0 88.3%
Simplified89.8%
Taylor expanded in a around inf 38.5%
associate-*r*38.5%
*-commutative38.5%
associate-*l*38.5%
Simplified38.5%
if 9.1999999999999998e-250 < (*.f64 b c) < 1.19999999999999998e-130 or 3.7999999999999996e-74 < (*.f64 b c) < 1.26e91Initial program 90.2%
Simplified87.9%
Taylor expanded in j around inf 42.2%
*-commutative42.2%
associate-*r*42.2%
*-commutative42.2%
associate-*l*42.3%
Simplified42.3%
Final simplification44.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 (* k (* j 27.0))))
(if (<= t_1 -1e-68)
(+ (* -27.0 (* j k)) (* -4.0 (* x i)))
(if (<= t_1 4e+14)
(* t (- (* 18.0 (* z (* x y))) (* a 4.0)))
(if (or (<= t_1 1e+146) (not (<= t_1 2e+249)))
(+ (* b c) (* j (* -27.0 k)))
(- (* -4.0 (* t a)) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 = k * (j * 27.0);
double tmp;
if (t_1 <= -1e-68) {
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
} else if (t_1 <= 4e+14) {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
} else if ((t_1 <= 1e+146) || !(t_1 <= 2e+249)) {
tmp = (b * c) + (j * (-27.0 * k));
} else {
tmp = (-4.0 * (t * a)) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = k * (j * 27.0d0)
if (t_1 <= (-1d-68)) then
tmp = ((-27.0d0) * (j * k)) + ((-4.0d0) * (x * i))
else if (t_1 <= 4d+14) then
tmp = t * ((18.0d0 * (z * (x * y))) - (a * 4.0d0))
else if ((t_1 <= 1d+146) .or. (.not. (t_1 <= 2d+249))) then
tmp = (b * c) + (j * ((-27.0d0) * k))
else
tmp = ((-4.0d0) * (t * a)) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = k * (j * 27.0);
double tmp;
if (t_1 <= -1e-68) {
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
} else if (t_1 <= 4e+14) {
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
} else if ((t_1 <= 1e+146) || !(t_1 <= 2e+249)) {
tmp = (b * c) + (j * (-27.0 * k));
} else {
tmp = (-4.0 * (t * a)) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = k * (j * 27.0) tmp = 0 if t_1 <= -1e-68: tmp = (-27.0 * (j * k)) + (-4.0 * (x * i)) elif t_1 <= 4e+14: tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0)) elif (t_1 <= 1e+146) or not (t_1 <= 2e+249): tmp = (b * c) + (j * (-27.0 * k)) else: tmp = (-4.0 * (t * a)) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(k * Float64(j * 27.0)) tmp = 0.0 if (t_1 <= -1e-68) tmp = Float64(Float64(-27.0 * Float64(j * k)) + Float64(-4.0 * Float64(x * i))); elseif (t_1 <= 4e+14) tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.0))); elseif ((t_1 <= 1e+146) || !(t_1 <= 2e+249)) tmp = Float64(Float64(b * c) + Float64(j * Float64(-27.0 * k))); else tmp = Float64(Float64(-4.0 * Float64(t * a)) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = k * (j * 27.0);
tmp = 0.0;
if (t_1 <= -1e-68)
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
elseif (t_1 <= 4e+14)
tmp = t * ((18.0 * (z * (x * y))) - (a * 4.0));
elseif ((t_1 <= 1e+146) || ~((t_1 <= 2e+249)))
tmp = (b * c) + (j * (-27.0 * k));
else
tmp = (-4.0 * (t * a)) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-68], N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+14], N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, 1e+146], N[Not[LessEqual[t$95$1, 2e+249]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(j * N[(-27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-68}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+14}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+146} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+249}\right):\\
\;\;\;\;b \cdot c + j \cdot \left(-27 \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -1.00000000000000007e-68Initial program 84.3%
Simplified88.5%
Taylor expanded in i around inf 69.3%
Taylor expanded in i around 0 70.8%
if -1.00000000000000007e-68 < (*.f64 (*.f64 j 27) k) < 4e14Initial program 81.2%
Simplified83.2%
associate-*r*86.4%
distribute-rgt-out--81.2%
associate-*l*81.9%
*-commutative81.9%
*-commutative81.9%
Applied egg-rr81.9%
Taylor expanded in t around inf 48.8%
expm1-log1p-u32.2%
expm1-udef31.3%
Applied egg-rr31.3%
expm1-def32.2%
expm1-log1p48.8%
associate-*r*51.9%
Simplified51.9%
if 4e14 < (*.f64 (*.f64 j 27) k) < 9.99999999999999934e145 or 1.9999999999999998e249 < (*.f64 (*.f64 j 27) k) Initial program 83.5%
Simplified82.0%
Taylor expanded in b around inf 57.3%
if 9.99999999999999934e145 < (*.f64 (*.f64 j 27) k) < 1.9999999999999998e249Initial program 91.4%
Taylor expanded in x around 0 75.5%
Taylor expanded in a around inf 90.8%
*-commutative90.8%
Simplified90.8%
Final simplification60.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 (* 4.0 (* t a))) (t_2 (* k (* j 27.0))))
(if (or (<= x -2.1e-40) (not (<= x 1.05e-122)))
(- (- (+ (* b c) (* x (- (* 18.0 (* t (* z y))) (* i 4.0)))) t_1) t_2)
(- (- (+ (* b c) (* (* t 18.0) (* z (* x y)))) 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 = 4.0 * (t * a);
double t_2 = k * (j * 27.0);
double tmp;
if ((x <= -2.1e-40) || !(x <= 1.05e-122)) {
tmp = (((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1) - t_2;
} else {
tmp = (((b * c) + ((t * 18.0) * (z * (x * y)))) - t_1) - 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 = 4.0d0 * (t * a)
t_2 = k * (j * 27.0d0)
if ((x <= (-2.1d-40)) .or. (.not. (x <= 1.05d-122))) then
tmp = (((b * c) + (x * ((18.0d0 * (t * (z * y))) - (i * 4.0d0)))) - t_1) - t_2
else
tmp = (((b * c) + ((t * 18.0d0) * (z * (x * y)))) - t_1) - 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 = 4.0 * (t * a);
double t_2 = k * (j * 27.0);
double tmp;
if ((x <= -2.1e-40) || !(x <= 1.05e-122)) {
tmp = (((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1) - t_2;
} else {
tmp = (((b * c) + ((t * 18.0) * (z * (x * y)))) - t_1) - 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 = 4.0 * (t * a) t_2 = k * (j * 27.0) tmp = 0 if (x <= -2.1e-40) or not (x <= 1.05e-122): tmp = (((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1) - t_2 else: tmp = (((b * c) + ((t * 18.0) * (z * (x * y)))) - t_1) - 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(4.0 * Float64(t * a)) t_2 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if ((x <= -2.1e-40) || !(x <= 1.05e-122)) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 4.0)))) - t_1) - t_2); else tmp = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * 18.0) * Float64(z * Float64(x * y)))) - t_1) - 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 = 4.0 * (t * a);
t_2 = k * (j * 27.0);
tmp = 0.0;
if ((x <= -2.1e-40) || ~((x <= 1.05e-122)))
tmp = (((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1) - t_2;
else
tmp = (((b * c) + ((t * 18.0) * (z * (x * y)))) - t_1) - 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[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -2.1e-40], N[Not[LessEqual[x, 1.05e-122]], $MachinePrecision]], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * 18.0), $MachinePrecision] * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(t \cdot a\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;x \leq -2.1 \cdot 10^{-40} \lor \neg \left(x \leq 1.05 \cdot 10^{-122}\right):\\
\;\;\;\;\left(\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\right) - t\_1\right) - t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + \left(t \cdot 18\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\right) - t\_1\right) - t\_2\\
\end{array}
\end{array}
if x < -2.10000000000000018e-40 or 1.04999999999999996e-122 < x Initial program 75.9%
Taylor expanded in x around 0 85.8%
if -2.10000000000000018e-40 < x < 1.04999999999999996e-122Initial program 96.5%
Taylor expanded in x around 0 79.4%
Taylor expanded in t around inf 84.9%
associate-*r*83.8%
Simplified83.8%
expm1-log1p-u27.8%
expm1-udef25.7%
Applied egg-rr74.5%
expm1-def27.8%
expm1-log1p33.8%
associate-*r*39.8%
Simplified94.4%
Final simplification88.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 (* k (* j 27.0)))
(t_2 (- (- (* b c) (* (* x i) 4.0)) t_1))
(t_3 (* x (- (* 18.0 (* t (* z y))) (* i 4.0)))))
(if (<= x -7.5e+201)
t_3
(if (<= x -2.9e-10)
t_2
(if (<= x 5.4e-52)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= x 4e+114) t_2 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 = k * (j * 27.0);
double t_2 = ((b * c) - ((x * i) * 4.0)) - t_1;
double t_3 = x * ((18.0 * (t * (z * y))) - (i * 4.0));
double tmp;
if (x <= -7.5e+201) {
tmp = t_3;
} else if (x <= -2.9e-10) {
tmp = t_2;
} else if (x <= 5.4e-52) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (x <= 4e+114) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = k * (j * 27.0d0)
t_2 = ((b * c) - ((x * i) * 4.0d0)) - t_1
t_3 = x * ((18.0d0 * (t * (z * y))) - (i * 4.0d0))
if (x <= (-7.5d+201)) then
tmp = t_3
else if (x <= (-2.9d-10)) then
tmp = t_2
else if (x <= 5.4d-52) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (x <= 4d+114) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = k * (j * 27.0);
double t_2 = ((b * c) - ((x * i) * 4.0)) - t_1;
double t_3 = x * ((18.0 * (t * (z * y))) - (i * 4.0));
double tmp;
if (x <= -7.5e+201) {
tmp = t_3;
} else if (x <= -2.9e-10) {
tmp = t_2;
} else if (x <= 5.4e-52) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (x <= 4e+114) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = k * (j * 27.0) t_2 = ((b * c) - ((x * i) * 4.0)) - t_1 t_3 = x * ((18.0 * (t * (z * y))) - (i * 4.0)) tmp = 0 if x <= -7.5e+201: tmp = t_3 elif x <= -2.9e-10: tmp = t_2 elif x <= 5.4e-52: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif x <= 4e+114: tmp = t_2 else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(k * Float64(j * 27.0)) t_2 = Float64(Float64(Float64(b * c) - Float64(Float64(x * i) * 4.0)) - t_1) t_3 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 4.0))) tmp = 0.0 if (x <= -7.5e+201) tmp = t_3; elseif (x <= -2.9e-10) tmp = t_2; elseif (x <= 5.4e-52) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (x <= 4e+114) tmp = t_2; else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = k * (j * 27.0);
t_2 = ((b * c) - ((x * i) * 4.0)) - t_1;
t_3 = x * ((18.0 * (t * (z * y))) - (i * 4.0));
tmp = 0.0;
if (x <= -7.5e+201)
tmp = t_3;
elseif (x <= -2.9e-10)
tmp = t_2;
elseif (x <= 5.4e-52)
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
elseif (x <= 4e+114)
tmp = t_2;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] - N[(N[(x * i), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.5e+201], t$95$3, If[LessEqual[x, -2.9e-10], t$95$2, If[LessEqual[x, 5.4e-52], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 4e+114], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := k \cdot \left(j \cdot 27\right)\\
t_2 := \left(b \cdot c - \left(x \cdot i\right) \cdot 4\right) - t\_1\\
t_3 := x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\\
\mathbf{if}\;x \leq -7.5 \cdot 10^{+201}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{-10}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{-52}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+114}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x < -7.5000000000000004e201 or 4e114 < x Initial program 66.1%
Simplified75.2%
Taylor expanded in x around inf 73.2%
if -7.5000000000000004e201 < x < -2.89999999999999981e-10 or 5.40000000000000019e-52 < x < 4e114Initial program 82.9%
Taylor expanded in t around 0 72.5%
if -2.89999999999999981e-10 < x < 5.40000000000000019e-52Initial program 95.1%
Taylor expanded in x around 0 82.4%
Final simplification76.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 (* k (* j 27.0))))
(if (or (<= x -8.4e-67) (not (<= x 1.05e-111)))
(- (+ (* b c) (* x (- (* 18.0 (* t (* z y))) (* i 4.0)))) t_1)
(- (- (+ (* b c) (* (* t 18.0) (* z (* x y)))) (* 4.0 (* t a))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 = k * (j * 27.0);
double tmp;
if ((x <= -8.4e-67) || !(x <= 1.05e-111)) {
tmp = ((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1;
} else {
tmp = (((b * c) + ((t * 18.0) * (z * (x * y)))) - (4.0 * (t * a))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = k * (j * 27.0d0)
if ((x <= (-8.4d-67)) .or. (.not. (x <= 1.05d-111))) then
tmp = ((b * c) + (x * ((18.0d0 * (t * (z * y))) - (i * 4.0d0)))) - t_1
else
tmp = (((b * c) + ((t * 18.0d0) * (z * (x * y)))) - (4.0d0 * (t * a))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = k * (j * 27.0);
double tmp;
if ((x <= -8.4e-67) || !(x <= 1.05e-111)) {
tmp = ((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1;
} else {
tmp = (((b * c) + ((t * 18.0) * (z * (x * y)))) - (4.0 * (t * a))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = k * (j * 27.0) tmp = 0 if (x <= -8.4e-67) or not (x <= 1.05e-111): tmp = ((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1 else: tmp = (((b * c) + ((t * 18.0) * (z * (x * y)))) - (4.0 * (t * a))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(k * Float64(j * 27.0)) tmp = 0.0 if ((x <= -8.4e-67) || !(x <= 1.05e-111)) tmp = Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * 18.0) * Float64(z * Float64(x * y)))) - Float64(4.0 * Float64(t * a))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = k * (j * 27.0);
tmp = 0.0;
if ((x <= -8.4e-67) || ~((x <= 1.05e-111)))
tmp = ((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1;
else
tmp = (((b * c) + ((t * 18.0) * (z * (x * y)))) - (4.0 * (t * a))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -8.4e-67], N[Not[LessEqual[x, 1.05e-111]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * 18.0), $MachinePrecision] * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;x \leq -8.4 \cdot 10^{-67} \lor \neg \left(x \leq 1.05 \cdot 10^{-111}\right):\\
\;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + \left(t \cdot 18\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\end{array}
\end{array}
if x < -8.4000000000000006e-67 or 1.0499999999999999e-111 < x Initial program 75.5%
Taylor expanded in x around 0 85.2%
Taylor expanded in a around 0 82.6%
if -8.4000000000000006e-67 < x < 1.0499999999999999e-111Initial program 97.6%
Taylor expanded in x around 0 80.3%
Taylor expanded in t around inf 85.8%
associate-*r*84.8%
Simplified84.8%
expm1-log1p-u29.3%
expm1-udef27.1%
Applied egg-rr76.5%
expm1-def29.3%
expm1-log1p34.2%
associate-*r*40.2%
Simplified95.5%
Final simplification87.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 (* k (* j 27.0))))
(if (<= x -2e-150)
(-
(+ (* b c) (* t (- (* (* z y) (* 18.0 x)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(if (<= x 1.75e-112)
(- (- (+ (* b c) (* (* t 18.0) (* z (* x y)))) (* 4.0 (* t a))) t_1)
(- (+ (* b c) (* x (- (* 18.0 (* t (* z y))) (* i 4.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 = k * (j * 27.0);
double tmp;
if (x <= -2e-150) {
tmp = ((b * c) + (t * (((z * y) * (18.0 * x)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else if (x <= 1.75e-112) {
tmp = (((b * c) + ((t * 18.0) * (z * (x * y)))) - (4.0 * (t * a))) - t_1;
} else {
tmp = ((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = k * (j * 27.0d0)
if (x <= (-2d-150)) then
tmp = ((b * c) + (t * (((z * y) * (18.0d0 * x)) - (a * 4.0d0)))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
else if (x <= 1.75d-112) then
tmp = (((b * c) + ((t * 18.0d0) * (z * (x * y)))) - (4.0d0 * (t * a))) - t_1
else
tmp = ((b * c) + (x * ((18.0d0 * (t * (z * y))) - (i * 4.0d0)))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = k * (j * 27.0);
double tmp;
if (x <= -2e-150) {
tmp = ((b * c) + (t * (((z * y) * (18.0 * x)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else if (x <= 1.75e-112) {
tmp = (((b * c) + ((t * 18.0) * (z * (x * y)))) - (4.0 * (t * a))) - t_1;
} else {
tmp = ((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = k * (j * 27.0) tmp = 0 if x <= -2e-150: tmp = ((b * c) + (t * (((z * y) * (18.0 * x)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0))) elif x <= 1.75e-112: tmp = (((b * c) + ((t * 18.0) * (z * (x * y)))) - (4.0 * (t * a))) - t_1 else: tmp = ((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(k * Float64(j * 27.0)) tmp = 0.0 if (x <= -2e-150) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(z * y) * Float64(18.0 * x)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); elseif (x <= 1.75e-112) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * 18.0) * Float64(z * Float64(x * y)))) - Float64(4.0 * Float64(t * a))) - t_1); else tmp = Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 4.0)))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = k * (j * 27.0);
tmp = 0.0;
if (x <= -2e-150)
tmp = ((b * c) + (t * (((z * y) * (18.0 * x)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
elseif (x <= 1.75e-112)
tmp = (((b * c) + ((t * 18.0) * (z * (x * y)))) - (4.0 * (t * a))) - t_1;
else
tmp = ((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2e-150], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(z * y), $MachinePrecision] * N[(18.0 * x), $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], If[LessEqual[x, 1.75e-112], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * 18.0), $MachinePrecision] * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;x \leq -2 \cdot 10^{-150}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(z \cdot y\right) \cdot \left(18 \cdot x\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{-112}:\\
\;\;\;\;\left(\left(b \cdot c + \left(t \cdot 18\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\right) - t\_1\\
\end{array}
\end{array}
if x < -2.00000000000000001e-150Initial program 76.3%
Simplified81.1%
if -2.00000000000000001e-150 < x < 1.74999999999999997e-112Initial program 99.7%
Taylor expanded in x around 0 78.7%
Taylor expanded in t around inf 85.9%
associate-*r*84.6%
Simplified84.6%
expm1-log1p-u28.7%
expm1-udef25.8%
Applied egg-rr77.0%
expm1-def28.7%
expm1-log1p33.4%
associate-*r*41.2%
Simplified97.1%
if 1.74999999999999997e-112 < x Initial program 77.7%
Taylor expanded in x around 0 86.8%
Taylor expanded in a around 0 85.0%
Final simplification86.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 (+ (* b c) (* j (* -27.0 k))))
(t_2 (* x (- (* 18.0 (* t (* z y))) (* i 4.0)))))
(if (<= x -1.92e-66)
t_2
(if (<= x 2.9e-212)
t_1
(if (<= x 5e-89)
(- (* -4.0 (* t a)) (* k (* j 27.0)))
(if (<= x 1.42e+91) 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) + (j * (-27.0 * k));
double t_2 = x * ((18.0 * (t * (z * y))) - (i * 4.0));
double tmp;
if (x <= -1.92e-66) {
tmp = t_2;
} else if (x <= 2.9e-212) {
tmp = t_1;
} else if (x <= 5e-89) {
tmp = (-4.0 * (t * a)) - (k * (j * 27.0));
} else if (x <= 1.42e+91) {
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) + (j * ((-27.0d0) * k))
t_2 = x * ((18.0d0 * (t * (z * y))) - (i * 4.0d0))
if (x <= (-1.92d-66)) then
tmp = t_2
else if (x <= 2.9d-212) then
tmp = t_1
else if (x <= 5d-89) then
tmp = ((-4.0d0) * (t * a)) - (k * (j * 27.0d0))
else if (x <= 1.42d+91) 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) + (j * (-27.0 * k));
double t_2 = x * ((18.0 * (t * (z * y))) - (i * 4.0));
double tmp;
if (x <= -1.92e-66) {
tmp = t_2;
} else if (x <= 2.9e-212) {
tmp = t_1;
} else if (x <= 5e-89) {
tmp = (-4.0 * (t * a)) - (k * (j * 27.0));
} else if (x <= 1.42e+91) {
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) + (j * (-27.0 * k)) t_2 = x * ((18.0 * (t * (z * y))) - (i * 4.0)) tmp = 0 if x <= -1.92e-66: tmp = t_2 elif x <= 2.9e-212: tmp = t_1 elif x <= 5e-89: tmp = (-4.0 * (t * a)) - (k * (j * 27.0)) elif x <= 1.42e+91: 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(b * c) + Float64(j * Float64(-27.0 * k))) t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 4.0))) tmp = 0.0 if (x <= -1.92e-66) tmp = t_2; elseif (x <= 2.9e-212) tmp = t_1; elseif (x <= 5e-89) tmp = Float64(Float64(-4.0 * Float64(t * a)) - Float64(k * Float64(j * 27.0))); elseif (x <= 1.42e+91) 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) + (j * (-27.0 * k));
t_2 = x * ((18.0 * (t * (z * y))) - (i * 4.0));
tmp = 0.0;
if (x <= -1.92e-66)
tmp = t_2;
elseif (x <= 2.9e-212)
tmp = t_1;
elseif (x <= 5e-89)
tmp = (-4.0 * (t * a)) - (k * (j * 27.0));
elseif (x <= 1.42e+91)
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[(b * c), $MachinePrecision] + N[(j * N[(-27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.92e-66], t$95$2, If[LessEqual[x, 2.9e-212], t$95$1, If[LessEqual[x, 5e-89], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.42e+91], 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 := b \cdot c + j \cdot \left(-27 \cdot k\right)\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\\
\mathbf{if}\;x \leq -1.92 \cdot 10^{-66}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-89}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;x \leq 1.42 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.92e-66 or 1.41999999999999995e91 < x Initial program 70.1%
Simplified79.8%
Taylor expanded in x around inf 65.1%
if -1.92e-66 < x < 2.8999999999999999e-212 or 4.99999999999999967e-89 < x < 1.41999999999999995e91Initial program 94.4%
Simplified87.4%
Taylor expanded in b around inf 61.4%
if 2.8999999999999999e-212 < x < 4.99999999999999967e-89Initial program 95.9%
Taylor expanded in x around 0 78.3%
Taylor expanded in a around inf 78.5%
*-commutative78.5%
Simplified78.5%
Final simplification65.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 (* k (* j 27.0))))
(if (or (<= x -9.8e-67) (not (<= x 1.95e-53)))
(- (+ (* b c) (* x (- (* 18.0 (* t (* z y))) (* i 4.0)))) t_1)
(- (- (* b c) (* 4.0 (* t a))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 = k * (j * 27.0);
double tmp;
if ((x <= -9.8e-67) || !(x <= 1.95e-53)) {
tmp = ((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1;
} else {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = k * (j * 27.0d0)
if ((x <= (-9.8d-67)) .or. (.not. (x <= 1.95d-53))) then
tmp = ((b * c) + (x * ((18.0d0 * (t * (z * y))) - (i * 4.0d0)))) - t_1
else
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = k * (j * 27.0);
double tmp;
if ((x <= -9.8e-67) || !(x <= 1.95e-53)) {
tmp = ((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1;
} else {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = k * (j * 27.0) tmp = 0 if (x <= -9.8e-67) or not (x <= 1.95e-53): tmp = ((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1 else: tmp = ((b * c) - (4.0 * (t * a))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(k * Float64(j * 27.0)) tmp = 0.0 if ((x <= -9.8e-67) || !(x <= 1.95e-53)) tmp = Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = k * (j * 27.0);
tmp = 0.0;
if ((x <= -9.8e-67) || ~((x <= 1.95e-53)))
tmp = ((b * c) + (x * ((18.0 * (t * (z * y))) - (i * 4.0)))) - t_1;
else
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -9.8e-67], N[Not[LessEqual[x, 1.95e-53]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;x \leq -9.8 \cdot 10^{-67} \lor \neg \left(x \leq 1.95 \cdot 10^{-53}\right):\\
\;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\end{array}
\end{array}
if x < -9.79999999999999987e-67 or 1.9500000000000001e-53 < x Initial program 75.2%
Taylor expanded in x around 0 85.6%
Taylor expanded in a around 0 84.0%
if -9.79999999999999987e-67 < x < 1.9500000000000001e-53Initial program 95.8%
Taylor expanded in x around 0 86.0%
Final simplification84.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
(let* ((t_1 (* -27.0 (* j k))))
(if (<= k -3.5e+30)
t_1
(if (<= k 3.6e-257)
(* 18.0 (* t (* y (* z x))))
(if (<= k 9e-47)
(* b c)
(if (<= k 1.8e-13)
(* 18.0 (* t (* x (* z y))))
(if (<= k 6.5e+92) (* b c) 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 = -27.0 * (j * k);
double tmp;
if (k <= -3.5e+30) {
tmp = t_1;
} else if (k <= 3.6e-257) {
tmp = 18.0 * (t * (y * (z * x)));
} else if (k <= 9e-47) {
tmp = b * c;
} else if (k <= 1.8e-13) {
tmp = 18.0 * (t * (x * (z * y)));
} else if (k <= 6.5e+92) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
if (k <= (-3.5d+30)) then
tmp = t_1
else if (k <= 3.6d-257) then
tmp = 18.0d0 * (t * (y * (z * x)))
else if (k <= 9d-47) then
tmp = b * c
else if (k <= 1.8d-13) then
tmp = 18.0d0 * (t * (x * (z * y)))
else if (k <= 6.5d+92) then
tmp = b * c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double tmp;
if (k <= -3.5e+30) {
tmp = t_1;
} else if (k <= 3.6e-257) {
tmp = 18.0 * (t * (y * (z * x)));
} else if (k <= 9e-47) {
tmp = b * c;
} else if (k <= 1.8e-13) {
tmp = 18.0 * (t * (x * (z * y)));
} else if (k <= 6.5e+92) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) tmp = 0 if k <= -3.5e+30: tmp = t_1 elif k <= 3.6e-257: tmp = 18.0 * (t * (y * (z * x))) elif k <= 9e-47: tmp = b * c elif k <= 1.8e-13: tmp = 18.0 * (t * (x * (z * y))) elif k <= 6.5e+92: tmp = b * c else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) tmp = 0.0 if (k <= -3.5e+30) tmp = t_1; elseif (k <= 3.6e-257) tmp = Float64(18.0 * Float64(t * Float64(y * Float64(z * x)))); elseif (k <= 9e-47) tmp = Float64(b * c); elseif (k <= 1.8e-13) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(z * y)))); elseif (k <= 6.5e+92) tmp = Float64(b * c); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -27.0 * (j * k);
tmp = 0.0;
if (k <= -3.5e+30)
tmp = t_1;
elseif (k <= 3.6e-257)
tmp = 18.0 * (t * (y * (z * x)));
elseif (k <= 9e-47)
tmp = b * c;
elseif (k <= 1.8e-13)
tmp = 18.0 * (t * (x * (z * y)));
elseif (k <= 6.5e+92)
tmp = b * c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -3.5e+30], t$95$1, If[LessEqual[k, 3.6e-257], N[(18.0 * N[(t * N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9e-47], N[(b * c), $MachinePrecision], If[LessEqual[k, 1.8e-13], N[(18.0 * N[(t * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.5e+92], N[(b * c), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;k \leq -3.5 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;k \leq 3.6 \cdot 10^{-257}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(y \cdot \left(z \cdot x\right)\right)\right)\\
\mathbf{elif}\;k \leq 9 \cdot 10^{-47}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;k \leq 1.8 \cdot 10^{-13}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{elif}\;k \leq 6.5 \cdot 10^{+92}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if k < -3.50000000000000021e30 or 6.49999999999999999e92 < k Initial program 87.0%
Simplified83.2%
Taylor expanded in j around inf 52.7%
if -3.50000000000000021e30 < k < 3.60000000000000007e-257Initial program 78.3%
Simplified89.9%
Taylor expanded in t around 0 84.7%
Simplified87.3%
Taylor expanded in z around inf 28.2%
associate-*r*29.4%
*-commutative29.4%
Simplified29.4%
Taylor expanded in z around 0 28.2%
*-commutative28.2%
associate-*l*29.4%
Simplified29.4%
if 3.60000000000000007e-257 < k < 9e-47 or 1.7999999999999999e-13 < k < 6.49999999999999999e92Initial program 84.9%
Simplified85.3%
Taylor expanded in t around 0 83.7%
Simplified89.5%
Taylor expanded in b around inf 35.6%
if 9e-47 < k < 1.7999999999999999e-13Initial program 73.1%
Simplified86.6%
Taylor expanded in t around 0 86.5%
Simplified86.5%
Taylor expanded in z around inf 31.0%
Final simplification40.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 (* -27.0 (* j k))))
(if (<= k -2.3e+30)
t_1
(if (<= k 7e-248)
(* 18.0 (* t (* z (* x y))))
(if (<= k 3.8e-47)
(* b c)
(if (<= k 3.9e-17)
(* 18.0 (* t (* x (* z y))))
(if (<= k 1.75e+88) (* b c) 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 = -27.0 * (j * k);
double tmp;
if (k <= -2.3e+30) {
tmp = t_1;
} else if (k <= 7e-248) {
tmp = 18.0 * (t * (z * (x * y)));
} else if (k <= 3.8e-47) {
tmp = b * c;
} else if (k <= 3.9e-17) {
tmp = 18.0 * (t * (x * (z * y)));
} else if (k <= 1.75e+88) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
if (k <= (-2.3d+30)) then
tmp = t_1
else if (k <= 7d-248) then
tmp = 18.0d0 * (t * (z * (x * y)))
else if (k <= 3.8d-47) then
tmp = b * c
else if (k <= 3.9d-17) then
tmp = 18.0d0 * (t * (x * (z * y)))
else if (k <= 1.75d+88) then
tmp = b * c
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double tmp;
if (k <= -2.3e+30) {
tmp = t_1;
} else if (k <= 7e-248) {
tmp = 18.0 * (t * (z * (x * y)));
} else if (k <= 3.8e-47) {
tmp = b * c;
} else if (k <= 3.9e-17) {
tmp = 18.0 * (t * (x * (z * y)));
} else if (k <= 1.75e+88) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) tmp = 0 if k <= -2.3e+30: tmp = t_1 elif k <= 7e-248: tmp = 18.0 * (t * (z * (x * y))) elif k <= 3.8e-47: tmp = b * c elif k <= 3.9e-17: tmp = 18.0 * (t * (x * (z * y))) elif k <= 1.75e+88: tmp = b * c else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) tmp = 0.0 if (k <= -2.3e+30) tmp = t_1; elseif (k <= 7e-248) tmp = Float64(18.0 * Float64(t * Float64(z * Float64(x * y)))); elseif (k <= 3.8e-47) tmp = Float64(b * c); elseif (k <= 3.9e-17) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(z * y)))); elseif (k <= 1.75e+88) tmp = Float64(b * c); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -27.0 * (j * k);
tmp = 0.0;
if (k <= -2.3e+30)
tmp = t_1;
elseif (k <= 7e-248)
tmp = 18.0 * (t * (z * (x * y)));
elseif (k <= 3.8e-47)
tmp = b * c;
elseif (k <= 3.9e-17)
tmp = 18.0 * (t * (x * (z * y)));
elseif (k <= 1.75e+88)
tmp = b * c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -2.3e+30], t$95$1, If[LessEqual[k, 7e-248], N[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.8e-47], N[(b * c), $MachinePrecision], If[LessEqual[k, 3.9e-17], N[(18.0 * N[(t * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.75e+88], N[(b * c), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;k \leq -2.3 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;k \leq 7 \cdot 10^{-248}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;k \leq 3.8 \cdot 10^{-47}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;k \leq 3.9 \cdot 10^{-17}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(z \cdot y\right)\right)\right)\\
\mathbf{elif}\;k \leq 1.75 \cdot 10^{+88}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if k < -2.3e30 or 1.7499999999999999e88 < k Initial program 87.0%
Simplified83.2%
Taylor expanded in j around inf 52.7%
if -2.3e30 < k < 6.99999999999999966e-248Initial program 77.6%
Simplified88.9%
Taylor expanded in t around 0 83.9%
Simplified86.4%
Taylor expanded in z around inf 27.6%
associate-*r*28.8%
*-commutative28.8%
Simplified28.8%
if 6.99999999999999966e-248 < k < 3.80000000000000015e-47 or 3.89999999999999989e-17 < k < 1.7499999999999999e88Initial program 84.0%
Simplified84.3%
Taylor expanded in t around 0 82.8%
Simplified88.4%
Taylor expanded in b around inf 36.0%
if 3.80000000000000015e-47 < k < 3.89999999999999989e-17Initial program 80.9%
Simplified99.8%
Taylor expanded in t around 0 99.7%
Simplified99.7%
Taylor expanded in z around inf 41.8%
Final simplification40.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 (or (<= (* b c) -3e+123) (not (<= (* b c) 3.5e+134))) (+ (* b c) (* j (* -27.0 k))) (+ (* -27.0 (* j k)) (* -4.0 (* x i)))))
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) <= -3e+123) || !((b * c) <= 3.5e+134)) {
tmp = (b * c) + (j * (-27.0 * k));
} else {
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) <= (-3d+123)) .or. (.not. ((b * c) <= 3.5d+134))) then
tmp = (b * c) + (j * ((-27.0d0) * k))
else
tmp = ((-27.0d0) * (j * k)) + ((-4.0d0) * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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) <= -3e+123) || !((b * c) <= 3.5e+134)) {
tmp = (b * c) + (j * (-27.0 * k));
} else {
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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) <= -3e+123) or not ((b * c) <= 3.5e+134): tmp = (b * c) + (j * (-27.0 * k)) else: tmp = (-27.0 * (j * k)) + (-4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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) <= -3e+123) || !(Float64(b * c) <= 3.5e+134)) tmp = Float64(Float64(b * c) + Float64(j * Float64(-27.0 * k))); else tmp = Float64(Float64(-27.0 * Float64(j * k)) + Float64(-4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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) <= -3e+123) || ~(((b * c) <= 3.5e+134)))
tmp = (b * c) + (j * (-27.0 * k));
else
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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], -3e+123], N[Not[LessEqual[N[(b * c), $MachinePrecision], 3.5e+134]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(j * N[(-27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 -3 \cdot 10^{+123} \lor \neg \left(b \cdot c \leq 3.5 \cdot 10^{+134}\right):\\
\;\;\;\;b \cdot c + j \cdot \left(-27 \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -3.00000000000000008e123 or 3.50000000000000003e134 < (*.f64 b c) Initial program 76.0%
Simplified86.7%
Taylor expanded in b around inf 69.4%
if -3.00000000000000008e123 < (*.f64 b c) < 3.50000000000000003e134Initial program 85.9%
Simplified85.7%
Taylor expanded in i around inf 53.0%
Taylor expanded in i around 0 54.1%
Final simplification58.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -2e-66) (not (<= x 2.1e+99))) (* x (- (* 18.0 (* t (* z y))) (* i 4.0))) (- (- (* b c) (* 4.0 (* t a))) (* 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 ((x <= -2e-66) || !(x <= 2.1e+99)) {
tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - (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 ((x <= (-2d-66)) .or. (.not. (x <= 2.1d+99))) then
tmp = x * ((18.0d0 * (t * (z * y))) - (i * 4.0d0))
else
tmp = ((b * c) - (4.0d0 * (t * a))) - (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 ((x <= -2e-66) || !(x <= 2.1e+99)) {
tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - (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 (x <= -2e-66) or not (x <= 2.1e+99): tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0)) else: tmp = ((b * c) - (4.0 * (t * a))) - (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 ((x <= -2e-66) || !(x <= 2.1e+99)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 4.0))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - 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 ((x <= -2e-66) || ~((x <= 2.1e+99)))
tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0));
else
tmp = ((b * c) - (4.0 * (t * a))) - (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[x, -2e-66], N[Not[LessEqual[x, 2.1e+99]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 -2 \cdot 10^{-66} \lor \neg \left(x \leq 2.1 \cdot 10^{+99}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if x < -2e-66 or 2.1000000000000001e99 < x Initial program 70.4%
Simplified80.2%
Taylor expanded in x around inf 66.2%
if -2e-66 < x < 2.1000000000000001e99Initial program 94.1%
Taylor expanded in x around 0 78.8%
Final simplification73.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 (* 18.0 (* (* z y) (* t x)))))
(if (<= x -1.35e+188)
t_1
(if (<= x 2.1e+96)
(+ (* b c) (* j (* -27.0 k)))
(if (<= x 6.5e+234) (* i (* -4.0 x)) 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 = 18.0 * ((z * y) * (t * x));
double tmp;
if (x <= -1.35e+188) {
tmp = t_1;
} else if (x <= 2.1e+96) {
tmp = (b * c) + (j * (-27.0 * k));
} else if (x <= 6.5e+234) {
tmp = i * (-4.0 * x);
} 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 = 18.0d0 * ((z * y) * (t * x))
if (x <= (-1.35d+188)) then
tmp = t_1
else if (x <= 2.1d+96) then
tmp = (b * c) + (j * ((-27.0d0) * k))
else if (x <= 6.5d+234) then
tmp = i * ((-4.0d0) * x)
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 = 18.0 * ((z * y) * (t * x));
double tmp;
if (x <= -1.35e+188) {
tmp = t_1;
} else if (x <= 2.1e+96) {
tmp = (b * c) + (j * (-27.0 * k));
} else if (x <= 6.5e+234) {
tmp = i * (-4.0 * x);
} 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 = 18.0 * ((z * y) * (t * x)) tmp = 0 if x <= -1.35e+188: tmp = t_1 elif x <= 2.1e+96: tmp = (b * c) + (j * (-27.0 * k)) elif x <= 6.5e+234: tmp = i * (-4.0 * x) 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(18.0 * Float64(Float64(z * y) * Float64(t * x))) tmp = 0.0 if (x <= -1.35e+188) tmp = t_1; elseif (x <= 2.1e+96) tmp = Float64(Float64(b * c) + Float64(j * Float64(-27.0 * k))); elseif (x <= 6.5e+234) tmp = Float64(i * Float64(-4.0 * x)); 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 = 18.0 * ((z * y) * (t * x));
tmp = 0.0;
if (x <= -1.35e+188)
tmp = t_1;
elseif (x <= 2.1e+96)
tmp = (b * c) + (j * (-27.0 * k));
elseif (x <= 6.5e+234)
tmp = i * (-4.0 * x);
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[(18.0 * N[(N[(z * y), $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.35e+188], t$95$1, If[LessEqual[x, 2.1e+96], N[(N[(b * c), $MachinePrecision] + N[(j * N[(-27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e+234], N[(i * N[(-4.0 * x), $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 := 18 \cdot \left(\left(z \cdot y\right) \cdot \left(t \cdot x\right)\right)\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+96}:\\
\;\;\;\;b \cdot c + j \cdot \left(-27 \cdot k\right)\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{+234}:\\
\;\;\;\;i \cdot \left(-4 \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.35e188 or 6.4999999999999995e234 < x Initial program 59.4%
Simplified72.3%
Taylor expanded in t around 0 70.1%
Simplified65.8%
Taylor expanded in z around inf 49.7%
associate-*r*55.8%
*-commutative55.8%
Simplified55.8%
Taylor expanded in t around 0 49.7%
associate-*r*61.4%
Simplified61.4%
if -1.35e188 < x < 2.1000000000000001e96Initial program 91.4%
Simplified88.8%
Taylor expanded in b around inf 54.9%
if 2.1000000000000001e96 < x < 6.4999999999999995e234Initial program 73.0%
Simplified89.5%
Taylor expanded in t around 0 81.1%
Simplified81.3%
Taylor expanded in i around inf 51.3%
*-commutative51.3%
associate-*r*51.3%
Simplified51.3%
Final simplification55.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 (if (or (<= (* b c) -1.02e+177) (not (<= (* b c) 9.5e+87))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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.02e+177) || !((b * c) <= 9.5e+87)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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.02d+177)) .or. (.not. ((b * c) <= 9.5d+87))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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.02e+177) || !((b * c) <= 9.5e+87)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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.02e+177) or not ((b * c) <= 9.5e+87): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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.02e+177) || !(Float64(b * c) <= 9.5e+87)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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.02e+177) || ~(((b * c) <= 9.5e+87)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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.02e+177], N[Not[LessEqual[N[(b * c), $MachinePrecision], 9.5e+87]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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.02 \cdot 10^{+177} \lor \neg \left(b \cdot c \leq 9.5 \cdot 10^{+87}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.02e177 or 9.4999999999999992e87 < (*.f64 b c) Initial program 74.5%
Simplified85.9%
Taylor expanded in t around 0 79.4%
Simplified85.9%
Taylor expanded in b around inf 58.1%
if -1.02e177 < (*.f64 b c) < 9.4999999999999992e87Initial program 86.7%
Simplified86.0%
Taylor expanded in j around inf 32.5%
Final simplification40.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 (* 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 83.1%
Simplified85.9%
Taylor expanded in t around 0 84.4%
Simplified88.9%
Taylor expanded in b around inf 21.6%
Final simplification21.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024031
(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)))