
(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 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* k (* j 27.0)))
INFINITY)
(fma
(- x)
(fma (* t (* y z)) -18.0 (* 4.0 i))
(fma -4.0 (* t a) (fma b c (* k (* j -27.0)))))
(fma (* k -27.0) j (* x (* (* y t) (* 18.0 z))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0))) <= ((double) INFINITY)) {
tmp = fma(-x, fma((t * (y * z)), -18.0, (4.0 * i)), fma(-4.0, (t * a), fma(b, c, (k * (j * -27.0)))));
} else {
tmp = fma((k * -27.0), j, (x * ((y * t) * (18.0 * z))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(k * Float64(j * 27.0))) <= Inf) tmp = fma(Float64(-x), fma(Float64(t * Float64(y * z)), -18.0, Float64(4.0 * i)), fma(-4.0, Float64(t * a), fma(b, c, Float64(k * Float64(j * -27.0))))); else tmp = fma(Float64(k * -27.0), j, Float64(x * Float64(Float64(y * t) * Float64(18.0 * z)))); 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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[((-x) * N[(N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision] * -18.0 + N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(b * c + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * -27.0), $MachinePrecision] * j + N[(x * N[(N[(y * t), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(-x, \mathsf{fma}\left(t \cdot \left(y \cdot z\right), -18, 4 \cdot i\right), \mathsf{fma}\left(-4, t \cdot a, \mathsf{fma}\left(b, c, k \cdot \left(j \cdot -27\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 97.7%
Simplified96.9%
Taylor expanded in x around -inf 97.3%
Simplified97.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%
Simplified25.8%
+-commutative25.8%
*-commutative25.8%
fma-def38.7%
associate-*r*38.7%
associate-*r*38.7%
Applied egg-rr38.7%
Taylor expanded in y around inf 64.7%
*-commutative64.7%
*-commutative64.7%
associate-*l*64.7%
*-commutative64.7%
associate-*r*64.7%
associate-*r*68.0%
associate-*l*68.0%
Simplified68.0%
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.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* k (* j 27.0)))
INFINITY)
(fma
(* k -27.0)
j
(fma t (fma x (* z (* 18.0 y)) (* a -4.0)) (fma b c (* -4.0 (* x i)))))
(fma (* k -27.0) j (* x (* (* y t) (* 18.0 z))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0))) <= ((double) INFINITY)) {
tmp = fma((k * -27.0), j, fma(t, fma(x, (z * (18.0 * y)), (a * -4.0)), fma(b, c, (-4.0 * (x * i)))));
} else {
tmp = fma((k * -27.0), j, (x * ((y * t) * (18.0 * z))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(k * Float64(j * 27.0))) <= Inf) tmp = fma(Float64(k * -27.0), j, fma(t, fma(x, Float64(z * Float64(18.0 * y)), Float64(a * -4.0)), fma(b, c, Float64(-4.0 * Float64(x * i))))); else tmp = fma(Float64(k * -27.0), j, Float64(x * Float64(Float64(y * t) * Float64(18.0 * z)))); 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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(k * -27.0), $MachinePrecision] * j + N[(t * N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * -27.0), $MachinePrecision] * j + N[(x * N[(N[(y * t), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, \mathsf{fma}\left(t, \mathsf{fma}\left(x, z \cdot \left(18 \cdot y\right), a \cdot -4\right), \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 97.7%
Simplified96.9%
+-commutative96.9%
*-commutative96.9%
fma-def96.9%
associate-*r*96.9%
associate-*r*96.9%
Applied egg-rr96.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%
Simplified25.8%
+-commutative25.8%
*-commutative25.8%
fma-def38.7%
associate-*r*38.7%
associate-*r*38.7%
Applied egg-rr38.7%
Taylor expanded in y around inf 64.7%
*-commutative64.7%
*-commutative64.7%
associate-*l*64.7%
*-commutative64.7%
associate-*r*64.7%
associate-*r*68.0%
associate-*l*68.0%
Simplified68.0%
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.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* k (* j 27.0)))
INFINITY)
(+
(fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* i -4.0))))
(* j (* k -27.0)))
(fma (* k -27.0) j (* x (* (* y t) (* 18.0 z))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0))) <= ((double) INFINITY)) {
tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (i * -4.0)))) + (j * (k * -27.0));
} else {
tmp = fma((k * -27.0), j, (x * ((y * t) * (18.0 * z))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(k * Float64(j * 27.0))) <= Inf) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(i * -4.0)))) + Float64(j * Float64(k * -27.0))); else tmp = fma(Float64(k * -27.0), j, Float64(x * Float64(Float64(y * t) * Float64(18.0 * z)))); 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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * -27.0), $MachinePrecision] * j + N[(x * N[(N[(y * t), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 97.7%
Simplified96.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%
Simplified25.8%
+-commutative25.8%
*-commutative25.8%
fma-def38.7%
associate-*r*38.7%
associate-*r*38.7%
Applied egg-rr38.7%
Taylor expanded in y around inf 64.7%
*-commutative64.7%
*-commutative64.7%
associate-*l*64.7%
*-commutative64.7%
associate-*r*64.7%
associate-*r*68.0%
associate-*l*68.0%
Simplified68.0%
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.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* k (* j 27.0)))
INFINITY)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(fma (* k -27.0) j (* x (* (* y t) (* 18.0 z))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0))) <= ((double) INFINITY)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = fma((k * -27.0), j, (x * ((y * t) * (18.0 * z))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(k * Float64(j * 27.0))) <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = fma(Float64(k * -27.0), j, Float64(x * Float64(Float64(y * t) * Float64(18.0 * z)))); 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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * -27.0), $MachinePrecision] * j + N[(x * N[(N[(y * t), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot -27, j, x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 97.7%
Simplified96.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%
Simplified25.8%
+-commutative25.8%
*-commutative25.8%
fma-def38.7%
associate-*r*38.7%
associate-*r*38.7%
Applied egg-rr38.7%
Taylor expanded in y around inf 64.7%
*-commutative64.7%
*-commutative64.7%
associate-*l*64.7%
*-commutative64.7%
associate-*r*64.7%
associate-*r*68.0%
associate-*l*68.0%
Simplified68.0%
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.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* k (* j 27.0)))
INFINITY)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0))) <= ((double) INFINITY)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0))) <= Double.POSITIVE_INFINITY) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0))) <= math.inf: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(k * Float64(j * 27.0))) <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0))) <= Inf)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 97.7%
Simplified96.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%
Simplified19.4%
Taylor expanded in x around inf 65.0%
Final simplification93.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* j (* k -27.0)) (* -4.0 (* t a)))))
(if (<= (* b c) -4e+51)
(- (* b c) (* k (* j 27.0)))
(if (<= (* b c) -15000.0)
(* 18.0 (* t (* x (* y z))))
(if (<= (* b c) -1.62e-59)
t_1
(if (<= (* b c) 2.75e-288)
(+ (* -4.0 (* x i)) (* -27.0 (* j k)))
(if (<= (* b c) 6.5e+56) t_1 (- (* b c) (* x (* 4.0 i))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (-4.0 * (t * a));
double tmp;
if ((b * c) <= -4e+51) {
tmp = (b * c) - (k * (j * 27.0));
} else if ((b * c) <= -15000.0) {
tmp = 18.0 * (t * (x * (y * z)));
} else if ((b * c) <= -1.62e-59) {
tmp = t_1;
} else if ((b * c) <= 2.75e-288) {
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
} else if ((b * c) <= 6.5e+56) {
tmp = t_1;
} else {
tmp = (b * c) - (x * (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
if ((b * c) <= (-4d+51)) then
tmp = (b * c) - (k * (j * 27.0d0))
else if ((b * c) <= (-15000.0d0)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if ((b * c) <= (-1.62d-59)) then
tmp = t_1
else if ((b * c) <= 2.75d-288) then
tmp = ((-4.0d0) * (x * i)) + ((-27.0d0) * (j * k))
else if ((b * c) <= 6.5d+56) then
tmp = t_1
else
tmp = (b * c) - (x * (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (-4.0 * (t * a));
double tmp;
if ((b * c) <= -4e+51) {
tmp = (b * c) - (k * (j * 27.0));
} else if ((b * c) <= -15000.0) {
tmp = 18.0 * (t * (x * (y * z)));
} else if ((b * c) <= -1.62e-59) {
tmp = t_1;
} else if ((b * c) <= 2.75e-288) {
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
} else if ((b * c) <= 6.5e+56) {
tmp = t_1;
} else {
tmp = (b * c) - (x * (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * (k * -27.0)) + (-4.0 * (t * a)) tmp = 0 if (b * c) <= -4e+51: tmp = (b * c) - (k * (j * 27.0)) elif (b * c) <= -15000.0: tmp = 18.0 * (t * (x * (y * z))) elif (b * c) <= -1.62e-59: tmp = t_1 elif (b * c) <= 2.75e-288: tmp = (-4.0 * (x * i)) + (-27.0 * (j * k)) elif (b * c) <= 6.5e+56: tmp = t_1 else: tmp = (b * c) - (x * (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (Float64(b * c) <= -4e+51) tmp = Float64(Float64(b * c) - Float64(k * Float64(j * 27.0))); elseif (Float64(b * c) <= -15000.0) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (Float64(b * c) <= -1.62e-59) tmp = t_1; elseif (Float64(b * c) <= 2.75e-288) tmp = Float64(Float64(-4.0 * Float64(x * i)) + Float64(-27.0 * Float64(j * k))); elseif (Float64(b * c) <= 6.5e+56) tmp = t_1; else tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * (k * -27.0)) + (-4.0 * (t * a));
tmp = 0.0;
if ((b * c) <= -4e+51)
tmp = (b * c) - (k * (j * 27.0));
elseif ((b * c) <= -15000.0)
tmp = 18.0 * (t * (x * (y * z)));
elseif ((b * c) <= -1.62e-59)
tmp = t_1;
elseif ((b * c) <= 2.75e-288)
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
elseif ((b * c) <= 6.5e+56)
tmp = t_1;
else
tmp = (b * c) - (x * (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -4e+51], N[(N[(b * c), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -15000.0], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.62e-59], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2.75e-288], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.5e+56], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -4 \cdot 10^{+51}:\\
\;\;\;\;b \cdot c - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;b \cdot c \leq -15000:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq -1.62 \cdot 10^{-59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 2.75 \cdot 10^{-288}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 6.5 \cdot 10^{+56}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -4e51Initial program 81.0%
Simplified84.5%
Taylor expanded in t around 0 76.1%
Taylor expanded in i around 0 64.9%
associate-*r*64.9%
Simplified64.9%
if -4e51 < (*.f64 b c) < -15000Initial program 84.0%
Simplified75.9%
Taylor expanded in a around 0 68.0%
expm1-log1p-u17.1%
expm1-udef17.1%
Applied egg-rr17.1%
expm1-def17.1%
expm1-log1p68.0%
associate-*r*66.9%
Simplified66.9%
Taylor expanded in t around 0 68.0%
*-commutative68.0%
associate-*r*83.5%
*-commutative83.5%
associate-*r*91.5%
Simplified91.5%
Taylor expanded in t around inf 59.9%
if -15000 < (*.f64 b c) < -1.61999999999999989e-59 or 2.75e-288 < (*.f64 b c) < 6.5000000000000001e56Initial program 80.0%
Simplified83.6%
Taylor expanded in a around inf 66.6%
*-commutative66.6%
Simplified66.6%
if -1.61999999999999989e-59 < (*.f64 b c) < 2.75e-288Initial program 96.0%
Simplified96.1%
Taylor expanded in i around inf 59.3%
associate-*r*59.3%
*-commutative59.3%
Simplified59.3%
Taylor expanded in x around 0 59.3%
if 6.5000000000000001e56 < (*.f64 b c) Initial program 82.5%
Simplified84.4%
Taylor expanded in t around 0 73.2%
Taylor expanded in i around inf 63.7%
*-commutative63.7%
*-commutative63.7%
associate-*r*63.7%
*-commutative63.7%
Simplified63.7%
Final simplification63.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* -4.0 (* t a)))))
(if (<= (* b c) -3.3e+47)
(- (* b c) (* k (* j 27.0)))
(if (<= (* b c) -500000000.0)
(* 18.0 (* t (* x (* y z))))
(if (<= (* b c) -1.8e-60)
t_2
(if (<= (* b c) 1.14e-278)
(+ t_1 (* x (* i -4.0)))
(if (<= (* b c) 1.95e+62) t_2 (- (* b c) (* x (* 4.0 i))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (-4.0 * (t * a));
double tmp;
if ((b * c) <= -3.3e+47) {
tmp = (b * c) - (k * (j * 27.0));
} else if ((b * c) <= -500000000.0) {
tmp = 18.0 * (t * (x * (y * z)));
} else if ((b * c) <= -1.8e-60) {
tmp = t_2;
} else if ((b * c) <= 1.14e-278) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 1.95e+62) {
tmp = t_2;
} else {
tmp = (b * c) - (x * (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + ((-4.0d0) * (t * a))
if ((b * c) <= (-3.3d+47)) then
tmp = (b * c) - (k * (j * 27.0d0))
else if ((b * c) <= (-500000000.0d0)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if ((b * c) <= (-1.8d-60)) then
tmp = t_2
else if ((b * c) <= 1.14d-278) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if ((b * c) <= 1.95d+62) then
tmp = t_2
else
tmp = (b * c) - (x * (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (-4.0 * (t * a));
double tmp;
if ((b * c) <= -3.3e+47) {
tmp = (b * c) - (k * (j * 27.0));
} else if ((b * c) <= -500000000.0) {
tmp = 18.0 * (t * (x * (y * z)));
} else if ((b * c) <= -1.8e-60) {
tmp = t_2;
} else if ((b * c) <= 1.14e-278) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 1.95e+62) {
tmp = t_2;
} else {
tmp = (b * c) - (x * (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (-4.0 * (t * a)) tmp = 0 if (b * c) <= -3.3e+47: tmp = (b * c) - (k * (j * 27.0)) elif (b * c) <= -500000000.0: tmp = 18.0 * (t * (x * (y * z))) elif (b * c) <= -1.8e-60: tmp = t_2 elif (b * c) <= 1.14e-278: tmp = t_1 + (x * (i * -4.0)) elif (b * c) <= 1.95e+62: tmp = t_2 else: tmp = (b * c) - (x * (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (Float64(b * c) <= -3.3e+47) tmp = Float64(Float64(b * c) - Float64(k * Float64(j * 27.0))); elseif (Float64(b * c) <= -500000000.0) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (Float64(b * c) <= -1.8e-60) tmp = t_2; elseif (Float64(b * c) <= 1.14e-278) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (Float64(b * c) <= 1.95e+62) tmp = t_2; else tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (-4.0 * (t * a));
tmp = 0.0;
if ((b * c) <= -3.3e+47)
tmp = (b * c) - (k * (j * 27.0));
elseif ((b * c) <= -500000000.0)
tmp = 18.0 * (t * (x * (y * z)));
elseif ((b * c) <= -1.8e-60)
tmp = t_2;
elseif ((b * c) <= 1.14e-278)
tmp = t_1 + (x * (i * -4.0));
elseif ((b * c) <= 1.95e+62)
tmp = t_2;
else
tmp = (b * c) - (x * (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.3e+47], N[(N[(b * c), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -500000000.0], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.8e-60], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.14e-278], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.95e+62], t$95$2, N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -3.3 \cdot 10^{+47}:\\
\;\;\;\;b \cdot c - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;b \cdot c \leq -500000000:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq -1.8 \cdot 10^{-60}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 1.14 \cdot 10^{-278}:\\
\;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.95 \cdot 10^{+62}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -3.2999999999999999e47Initial program 81.0%
Simplified84.5%
Taylor expanded in t around 0 76.1%
Taylor expanded in i around 0 64.9%
associate-*r*64.9%
Simplified64.9%
if -3.2999999999999999e47 < (*.f64 b c) < -5e8Initial program 84.0%
Simplified75.9%
Taylor expanded in a around 0 68.0%
expm1-log1p-u17.1%
expm1-udef17.1%
Applied egg-rr17.1%
expm1-def17.1%
expm1-log1p68.0%
associate-*r*66.9%
Simplified66.9%
Taylor expanded in t around 0 68.0%
*-commutative68.0%
associate-*r*83.5%
*-commutative83.5%
associate-*r*91.5%
Simplified91.5%
Taylor expanded in t around inf 59.9%
if -5e8 < (*.f64 b c) < -1.8e-60 or 1.14e-278 < (*.f64 b c) < 1.95e62Initial program 80.0%
Simplified83.6%
Taylor expanded in a around inf 66.6%
*-commutative66.6%
Simplified66.6%
if -1.8e-60 < (*.f64 b c) < 1.14e-278Initial program 96.0%
Simplified96.1%
Taylor expanded in i around inf 59.3%
associate-*r*59.3%
*-commutative59.3%
Simplified59.3%
if 1.95e62 < (*.f64 b c) Initial program 82.5%
Simplified84.4%
Taylor expanded in t around 0 73.2%
Taylor expanded in i around inf 63.7%
*-commutative63.7%
*-commutative63.7%
associate-*r*63.7%
*-commutative63.7%
Simplified63.7%
Final simplification63.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0)))))
(if (<= z -2.45e-52)
(* 18.0 (* t (* x (* y z))))
(if (<= z -4e-276)
(- (* b c) (* x (* 4.0 i)))
(if (<= z 6.5e-155)
t_1
(if (<= z 4.2e-5)
(+ (* -4.0 (* x i)) (* -27.0 (* j k)))
(if (or (<= z 7.2e+136)
(and (not (<= z 1.2e+169)) (<= z 1.15e+199)))
t_1
(* t (* 18.0 (* y (* x z)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double tmp;
if (z <= -2.45e-52) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (z <= -4e-276) {
tmp = (b * c) - (x * (4.0 * i));
} else if (z <= 6.5e-155) {
tmp = t_1;
} else if (z <= 4.2e-5) {
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
} else if ((z <= 7.2e+136) || (!(z <= 1.2e+169) && (z <= 1.15e+199))) {
tmp = t_1;
} else {
tmp = t * (18.0 * (y * (x * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
if (z <= (-2.45d-52)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (z <= (-4d-276)) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (z <= 6.5d-155) then
tmp = t_1
else if (z <= 4.2d-5) then
tmp = ((-4.0d0) * (x * i)) + ((-27.0d0) * (j * k))
else if ((z <= 7.2d+136) .or. (.not. (z <= 1.2d+169)) .and. (z <= 1.15d+199)) then
tmp = t_1
else
tmp = t * (18.0d0 * (y * (x * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double tmp;
if (z <= -2.45e-52) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (z <= -4e-276) {
tmp = (b * c) - (x * (4.0 * i));
} else if (z <= 6.5e-155) {
tmp = t_1;
} else if (z <= 4.2e-5) {
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
} else if ((z <= 7.2e+136) || (!(z <= 1.2e+169) && (z <= 1.15e+199))) {
tmp = t_1;
} else {
tmp = t * (18.0 * (y * (x * z)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (j * (k * -27.0)) tmp = 0 if z <= -2.45e-52: tmp = 18.0 * (t * (x * (y * z))) elif z <= -4e-276: tmp = (b * c) - (x * (4.0 * i)) elif z <= 6.5e-155: tmp = t_1 elif z <= 4.2e-5: tmp = (-4.0 * (x * i)) + (-27.0 * (j * k)) elif (z <= 7.2e+136) or (not (z <= 1.2e+169) and (z <= 1.15e+199)): tmp = t_1 else: tmp = t * (18.0 * (y * (x * z))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (z <= -2.45e-52) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (z <= -4e-276) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (z <= 6.5e-155) tmp = t_1; elseif (z <= 4.2e-5) tmp = Float64(Float64(-4.0 * Float64(x * i)) + Float64(-27.0 * Float64(j * k))); elseif ((z <= 7.2e+136) || (!(z <= 1.2e+169) && (z <= 1.15e+199))) tmp = t_1; else tmp = Float64(t * Float64(18.0 * Float64(y * Float64(x * z)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (j * (k * -27.0));
tmp = 0.0;
if (z <= -2.45e-52)
tmp = 18.0 * (t * (x * (y * z)));
elseif (z <= -4e-276)
tmp = (b * c) - (x * (4.0 * i));
elseif (z <= 6.5e-155)
tmp = t_1;
elseif (z <= 4.2e-5)
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
elseif ((z <= 7.2e+136) || (~((z <= 1.2e+169)) && (z <= 1.15e+199)))
tmp = t_1;
else
tmp = t * (18.0 * (y * (x * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.45e-52], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e-276], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e-155], t$95$1, If[LessEqual[z, 4.2e-5], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 7.2e+136], And[N[Not[LessEqual[z, 1.2e+169]], $MachinePrecision], LessEqual[z, 1.15e+199]]], t$95$1, N[(t * N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;z \leq -2.45 \cdot 10^{-52}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-276}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-155}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-5}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+136} \lor \neg \left(z \leq 1.2 \cdot 10^{+169}\right) \land z \leq 1.15 \cdot 10^{+199}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if z < -2.45000000000000009e-52Initial program 79.9%
Simplified79.9%
Taylor expanded in a around 0 76.3%
expm1-log1p-u58.1%
expm1-udef57.1%
Applied egg-rr57.1%
expm1-def58.1%
expm1-log1p76.3%
associate-*r*78.3%
Simplified78.3%
Taylor expanded in t around 0 76.3%
*-commutative76.3%
associate-*r*77.3%
*-commutative77.3%
associate-*r*77.3%
Simplified77.3%
Taylor expanded in t around inf 41.0%
if -2.45000000000000009e-52 < z < -4e-276Initial program 97.6%
Simplified97.7%
Taylor expanded in t around 0 66.9%
Taylor expanded in i around inf 52.3%
*-commutative52.3%
*-commutative52.3%
associate-*r*52.3%
*-commutative52.3%
Simplified52.3%
if -4e-276 < z < 6.5e-155 or 4.19999999999999977e-5 < z < 7.20000000000000011e136 or 1.1999999999999999e169 < z < 1.14999999999999997e199Initial program 82.6%
Simplified88.0%
Taylor expanded in b around inf 60.1%
if 6.5e-155 < z < 4.19999999999999977e-5Initial program 93.7%
Simplified93.8%
Taylor expanded in i around inf 57.7%
associate-*r*57.7%
*-commutative57.7%
Simplified57.7%
Taylor expanded in x around 0 57.8%
if 7.20000000000000011e136 < z < 1.1999999999999999e169 or 1.14999999999999997e199 < z Initial program 83.9%
Simplified88.0%
Taylor expanded in a around 0 76.3%
expm1-log1p-u27.8%
expm1-udef27.8%
Applied egg-rr27.8%
expm1-def27.8%
expm1-log1p76.3%
associate-*r*76.1%
Simplified76.1%
Taylor expanded in t around 0 76.3%
*-commutative76.3%
associate-*r*76.2%
*-commutative76.2%
associate-*r*76.4%
Simplified76.4%
Taylor expanded in t around inf 66.7%
*-commutative66.7%
associate-*l*66.7%
*-commutative66.7%
associate-*l*63.1%
Simplified63.1%
Final simplification52.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -1.8e+194)
(* b c)
(if (<= (* b c) -8.8e-51)
(* -27.0 (* j k))
(if (<= (* b c) 9.8e-169)
(* t (* 18.0 (* y (* x z))))
(if (<= (* b c) 1.56e+209)
(* t (* a -4.0))
(if (<= (* b c) 5.1e+237) (* 18.0 (* t (* x (* y z)))) (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.8e+194) {
tmp = b * c;
} else if ((b * c) <= -8.8e-51) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 9.8e-169) {
tmp = t * (18.0 * (y * (x * z)));
} else if ((b * c) <= 1.56e+209) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 5.1e+237) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-1.8d+194)) then
tmp = b * c
else if ((b * c) <= (-8.8d-51)) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 9.8d-169) then
tmp = t * (18.0d0 * (y * (x * z)))
else if ((b * c) <= 1.56d+209) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 5.1d+237) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.8e+194) {
tmp = b * c;
} else if ((b * c) <= -8.8e-51) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 9.8e-169) {
tmp = t * (18.0 * (y * (x * z)));
} else if ((b * c) <= 1.56e+209) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 5.1e+237) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -1.8e+194: tmp = b * c elif (b * c) <= -8.8e-51: tmp = -27.0 * (j * k) elif (b * c) <= 9.8e-169: tmp = t * (18.0 * (y * (x * z))) elif (b * c) <= 1.56e+209: tmp = t * (a * -4.0) elif (b * c) <= 5.1e+237: tmp = 18.0 * (t * (x * (y * z))) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -1.8e+194) tmp = Float64(b * c); elseif (Float64(b * c) <= -8.8e-51) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 9.8e-169) tmp = Float64(t * Float64(18.0 * Float64(y * Float64(x * z)))); elseif (Float64(b * c) <= 1.56e+209) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 5.1e+237) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -1.8e+194)
tmp = b * c;
elseif ((b * c) <= -8.8e-51)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 9.8e-169)
tmp = t * (18.0 * (y * (x * z)));
elseif ((b * c) <= 1.56e+209)
tmp = t * (a * -4.0);
elseif ((b * c) <= 5.1e+237)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -1.8e+194], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -8.8e-51], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9.8e-169], N[(t * N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.56e+209], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5.1e+237], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.8 \cdot 10^{+194}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -8.8 \cdot 10^{-51}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 9.8 \cdot 10^{-169}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 1.56 \cdot 10^{+209}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 5.1 \cdot 10^{+237}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.8e194 or 5.09999999999999979e237 < (*.f64 b c) Initial program 81.1%
Simplified81.1%
associate-*r*81.1%
distribute-rgt-out--81.1%
associate-*l*77.4%
*-commutative77.4%
*-commutative77.4%
Applied egg-rr77.4%
Taylor expanded in b around inf 75.8%
if -1.8e194 < (*.f64 b c) < -8.8000000000000001e-51Initial program 84.3%
Simplified88.4%
Taylor expanded in j around inf 36.5%
if -8.8000000000000001e-51 < (*.f64 b c) < 9.7999999999999999e-169Initial program 91.4%
Simplified92.5%
Taylor expanded in a around 0 79.5%
expm1-log1p-u61.0%
expm1-udef59.0%
Applied egg-rr59.0%
expm1-def61.0%
expm1-log1p79.5%
associate-*r*76.3%
Simplified76.3%
Taylor expanded in t around 0 79.5%
*-commutative79.5%
associate-*r*79.6%
*-commutative79.6%
associate-*r*81.7%
Simplified81.7%
Taylor expanded in t around inf 35.6%
*-commutative35.6%
associate-*l*35.6%
*-commutative35.6%
associate-*l*36.5%
Simplified36.5%
if 9.7999999999999999e-169 < (*.f64 b c) < 1.56e209Initial program 83.5%
Simplified85.3%
associate-*r*87.2%
distribute-rgt-out--83.5%
associate-*l*79.7%
*-commutative79.7%
*-commutative79.7%
Applied egg-rr79.7%
Taylor expanded in a around inf 34.1%
*-commutative34.1%
*-commutative34.1%
associate-*r*34.1%
Simplified34.1%
if 1.56e209 < (*.f64 b c) < 5.09999999999999979e237Initial program 66.7%
Simplified66.7%
Taylor expanded in a around 0 66.7%
expm1-log1p-u33.3%
expm1-udef33.3%
Applied egg-rr33.3%
expm1-def33.3%
expm1-log1p66.7%
associate-*r*66.7%
Simplified66.7%
Taylor expanded in t around 0 66.7%
*-commutative66.7%
associate-*r*66.7%
*-commutative66.7%
associate-*r*66.7%
Simplified66.7%
Taylor expanded in t around inf 67.0%
Final simplification44.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_2 (* j (* k -27.0)))
(t_3 (+ t_2 (* -4.0 (+ (* t a) (* x i))))))
(if (<= t -8.6e+202)
t_1
(if (<= t -1.05e-89)
t_3
(if (<= t -6.4e-164)
(+ t_2 (* x (* t (* y (* 18.0 z)))))
(if (<= t 1.3e-75) (+ (* b c) t_2) (if (<= t 5.4e+98) t_3 t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (-4.0 * ((t * a) + (x * i)));
double tmp;
if (t <= -8.6e+202) {
tmp = t_1;
} else if (t <= -1.05e-89) {
tmp = t_3;
} else if (t <= -6.4e-164) {
tmp = t_2 + (x * (t * (y * (18.0 * z))));
} else if (t <= 1.3e-75) {
tmp = (b * c) + t_2;
} else if (t <= 5.4e+98) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
t_2 = j * (k * (-27.0d0))
t_3 = t_2 + ((-4.0d0) * ((t * a) + (x * i)))
if (t <= (-8.6d+202)) then
tmp = t_1
else if (t <= (-1.05d-89)) then
tmp = t_3
else if (t <= (-6.4d-164)) then
tmp = t_2 + (x * (t * (y * (18.0d0 * z))))
else if (t <= 1.3d-75) then
tmp = (b * c) + t_2
else if (t <= 5.4d+98) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (-4.0 * ((t * a) + (x * i)));
double tmp;
if (t <= -8.6e+202) {
tmp = t_1;
} else if (t <= -1.05e-89) {
tmp = t_3;
} else if (t <= -6.4e-164) {
tmp = t_2 + (x * (t * (y * (18.0 * z))));
} else if (t <= 1.3e-75) {
tmp = (b * c) + t_2;
} else if (t <= 5.4e+98) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) t_2 = j * (k * -27.0) t_3 = t_2 + (-4.0 * ((t * a) + (x * i))) tmp = 0 if t <= -8.6e+202: tmp = t_1 elif t <= -1.05e-89: tmp = t_3 elif t <= -6.4e-164: tmp = t_2 + (x * (t * (y * (18.0 * z)))) elif t <= 1.3e-75: tmp = (b * c) + t_2 elif t <= 5.4e+98: tmp = t_3 else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(t_2 + Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i)))) tmp = 0.0 if (t <= -8.6e+202) tmp = t_1; elseif (t <= -1.05e-89) tmp = t_3; elseif (t <= -6.4e-164) tmp = Float64(t_2 + Float64(x * Float64(t * Float64(y * Float64(18.0 * z))))); elseif (t <= 1.3e-75) tmp = Float64(Float64(b * c) + t_2); elseif (t <= 5.4e+98) tmp = t_3; else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
t_2 = j * (k * -27.0);
t_3 = t_2 + (-4.0 * ((t * a) + (x * i)));
tmp = 0.0;
if (t <= -8.6e+202)
tmp = t_1;
elseif (t <= -1.05e-89)
tmp = t_3;
elseif (t <= -6.4e-164)
tmp = t_2 + (x * (t * (y * (18.0 * z))));
elseif (t <= 1.3e-75)
tmp = (b * c) + t_2;
elseif (t <= 5.4e+98)
tmp = t_3;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e+202], t$95$1, If[LessEqual[t, -1.05e-89], t$95$3, If[LessEqual[t, -6.4e-164], N[(t$95$2 + N[(x * N[(t * N[(y * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-75], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t, 5.4e+98], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t_2 + -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{+202}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-89}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -6.4 \cdot 10^{-164}:\\
\;\;\;\;t_2 + x \cdot \left(t \cdot \left(y \cdot \left(18 \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-75}:\\
\;\;\;\;b \cdot c + t_2\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+98}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -8.6000000000000005e202 or 5.4e98 < t Initial program 74.9%
Simplified82.3%
Taylor expanded in t around inf 80.7%
if -8.6000000000000005e202 < t < -1.05e-89 or 1.3e-75 < t < 5.4e98Initial program 91.3%
Simplified91.4%
Taylor expanded in y around 0 77.8%
Taylor expanded in b around 0 65.0%
distribute-lft-out65.0%
*-commutative65.0%
*-commutative65.0%
Simplified65.0%
if -1.05e-89 < t < -6.4000000000000001e-164Initial program 87.2%
Simplified93.8%
Taylor expanded in y around inf 61.8%
*-commutative61.8%
associate-*r*67.9%
associate-*l*67.9%
*-commutative67.9%
*-commutative67.9%
associate-*l*67.9%
*-commutative67.9%
associate-*l*68.0%
*-commutative68.0%
associate-*l*68.0%
Simplified68.0%
if -6.4000000000000001e-164 < t < 1.3e-75Initial program 88.1%
Simplified86.7%
Taylor expanded in b around inf 68.4%
Final simplification70.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (- (+ (* b c) (* 18.0 (* t (* x (* y z))))) (* 4.0 (* x i)))))
(if (<= x -1.05e+131)
t_2
(if (<= x -9e-66)
(+ t_1 (* -4.0 (+ (* t a) (* x i))))
(if (<= x 2.6e-27)
(- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))
(if (<= x 5.8e+70)
t_2
(if (<= x 1.5e+167)
(+ t_1 (* x (* t (* y (* 18.0 z)))))
(* x (- (* i (- 4.0)) (* t (* z (* y -18.0))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = ((b * c) + (18.0 * (t * (x * (y * z))))) - (4.0 * (x * i));
double tmp;
if (x <= -1.05e+131) {
tmp = t_2;
} else if (x <= -9e-66) {
tmp = t_1 + (-4.0 * ((t * a) + (x * i)));
} else if (x <= 2.6e-27) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else if (x <= 5.8e+70) {
tmp = t_2;
} else if (x <= 1.5e+167) {
tmp = t_1 + (x * (t * (y * (18.0 * z))));
} else {
tmp = x * ((i * -4.0) - (t * (z * (y * -18.0))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = ((b * c) + (18.0d0 * (t * (x * (y * z))))) - (4.0d0 * (x * i))
if (x <= (-1.05d+131)) then
tmp = t_2
else if (x <= (-9d-66)) then
tmp = t_1 + ((-4.0d0) * ((t * a) + (x * i)))
else if (x <= 2.6d-27) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
else if (x <= 5.8d+70) then
tmp = t_2
else if (x <= 1.5d+167) then
tmp = t_1 + (x * (t * (y * (18.0d0 * z))))
else
tmp = x * ((i * -4.0d0) - (t * (z * (y * (-18.0d0)))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = ((b * c) + (18.0 * (t * (x * (y * z))))) - (4.0 * (x * i));
double tmp;
if (x <= -1.05e+131) {
tmp = t_2;
} else if (x <= -9e-66) {
tmp = t_1 + (-4.0 * ((t * a) + (x * i)));
} else if (x <= 2.6e-27) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else if (x <= 5.8e+70) {
tmp = t_2;
} else if (x <= 1.5e+167) {
tmp = t_1 + (x * (t * (y * (18.0 * z))));
} else {
tmp = x * ((i * -4.0) - (t * (z * (y * -18.0))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = ((b * c) + (18.0 * (t * (x * (y * z))))) - (4.0 * (x * i)) tmp = 0 if x <= -1.05e+131: tmp = t_2 elif x <= -9e-66: tmp = t_1 + (-4.0 * ((t * a) + (x * i))) elif x <= 2.6e-27: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) elif x <= 5.8e+70: tmp = t_2 elif x <= 1.5e+167: tmp = t_1 + (x * (t * (y * (18.0 * z)))) else: tmp = x * ((i * -4.0) - (t * (z * (y * -18.0)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (x <= -1.05e+131) tmp = t_2; elseif (x <= -9e-66) tmp = Float64(t_1 + Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i)))); elseif (x <= 2.6e-27) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); elseif (x <= 5.8e+70) tmp = t_2; elseif (x <= 1.5e+167) tmp = Float64(t_1 + Float64(x * Float64(t * Float64(y * Float64(18.0 * z))))); else tmp = Float64(x * Float64(Float64(i * Float64(-4.0)) - Float64(t * Float64(z * Float64(y * -18.0))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = ((b * c) + (18.0 * (t * (x * (y * z))))) - (4.0 * (x * i));
tmp = 0.0;
if (x <= -1.05e+131)
tmp = t_2;
elseif (x <= -9e-66)
tmp = t_1 + (-4.0 * ((t * a) + (x * i)));
elseif (x <= 2.6e-27)
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
elseif (x <= 5.8e+70)
tmp = t_2;
elseif (x <= 1.5e+167)
tmp = t_1 + (x * (t * (y * (18.0 * z))));
else
tmp = x * ((i * -4.0) - (t * (z * (y * -18.0))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+131], t$95$2, If[LessEqual[x, -9e-66], N[(t$95$1 + N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.6e-27], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e+70], t$95$2, If[LessEqual[x, 1.5e+167], N[(t$95$1 + N[(x * N[(t * N[(y * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(i * (-4.0)), $MachinePrecision] - N[(t * N[(z * N[(y * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := \left(b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+131}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -9 \cdot 10^{-66}:\\
\;\;\;\;t_1 + -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-27}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{+70}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+167}:\\
\;\;\;\;t_1 + x \cdot \left(t \cdot \left(y \cdot \left(18 \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot \left(-4\right) - t \cdot \left(z \cdot \left(y \cdot -18\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.04999999999999993e131 or 2.60000000000000017e-27 < x < 5.7999999999999997e70Initial program 81.7%
Simplified86.3%
Taylor expanded in a around 0 82.2%
Taylor expanded in j around 0 75.6%
if -1.04999999999999993e131 < x < -8.9999999999999995e-66Initial program 80.5%
Simplified86.3%
Taylor expanded in y around 0 73.7%
Taylor expanded in b around 0 67.3%
distribute-lft-out67.3%
*-commutative67.3%
*-commutative67.3%
Simplified67.3%
if -8.9999999999999995e-66 < x < 2.60000000000000017e-27Initial program 99.9%
Simplified96.0%
Taylor expanded in x around 0 87.1%
if 5.7999999999999997e70 < x < 1.50000000000000006e167Initial program 69.8%
Simplified75.0%
Taylor expanded in y around inf 67.2%
*-commutative67.2%
associate-*r*67.2%
associate-*l*67.2%
*-commutative67.2%
*-commutative67.2%
associate-*l*67.3%
*-commutative67.3%
associate-*l*67.3%
*-commutative67.3%
associate-*l*67.3%
Simplified67.3%
if 1.50000000000000006e167 < x Initial program 70.9%
Simplified78.2%
associate-*r*75.8%
distribute-rgt-out--70.9%
associate-*l*75.5%
*-commutative75.5%
*-commutative75.5%
Applied egg-rr75.5%
Taylor expanded in x around -inf 83.4%
mul-1-neg83.4%
cancel-sign-sub-inv83.4%
associate-*r*83.4%
metadata-eval83.4%
Simplified83.4%
Taylor expanded in t around 0 83.4%
associate-*r*83.4%
*-commutative83.4%
associate-*r*78.8%
associate-*l*78.8%
associate-*l*83.4%
*-commutative83.4%
Simplified83.4%
Final simplification79.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0)))) (t_2 (* 18.0 (* t (* x (* y z))))))
(if (<= t -1.32e+231)
t_2
(if (<= t 1.8e-259)
t_1
(if (<= t 9.6e-195)
(- (* b c) (* x (* 4.0 i)))
(if (<= t 1.75e+67)
t_1
(if (<= t 4.8e+127)
(* t (* 18.0 (* y (* x z))))
(if (<= t 3e+168) (* t (* a -4.0)) t_2))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -1.32e+231) {
tmp = t_2;
} else if (t <= 1.8e-259) {
tmp = t_1;
} else if (t <= 9.6e-195) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 1.75e+67) {
tmp = t_1;
} else if (t <= 4.8e+127) {
tmp = t * (18.0 * (y * (x * z)));
} else if (t <= 3e+168) {
tmp = t * (a * -4.0);
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
t_2 = 18.0d0 * (t * (x * (y * z)))
if (t <= (-1.32d+231)) then
tmp = t_2
else if (t <= 1.8d-259) then
tmp = t_1
else if (t <= 9.6d-195) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (t <= 1.75d+67) then
tmp = t_1
else if (t <= 4.8d+127) then
tmp = t * (18.0d0 * (y * (x * z)))
else if (t <= 3d+168) then
tmp = t * (a * (-4.0d0))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -1.32e+231) {
tmp = t_2;
} else if (t <= 1.8e-259) {
tmp = t_1;
} else if (t <= 9.6e-195) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 1.75e+67) {
tmp = t_1;
} else if (t <= 4.8e+127) {
tmp = t * (18.0 * (y * (x * z)));
} else if (t <= 3e+168) {
tmp = t * (a * -4.0);
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (j * (k * -27.0)) t_2 = 18.0 * (t * (x * (y * z))) tmp = 0 if t <= -1.32e+231: tmp = t_2 elif t <= 1.8e-259: tmp = t_1 elif t <= 9.6e-195: tmp = (b * c) - (x * (4.0 * i)) elif t <= 1.75e+67: tmp = t_1 elif t <= 4.8e+127: tmp = t * (18.0 * (y * (x * z))) elif t <= 3e+168: tmp = t * (a * -4.0) else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (t <= -1.32e+231) tmp = t_2; elseif (t <= 1.8e-259) tmp = t_1; elseif (t <= 9.6e-195) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (t <= 1.75e+67) tmp = t_1; elseif (t <= 4.8e+127) tmp = Float64(t * Float64(18.0 * Float64(y * Float64(x * z)))); elseif (t <= 3e+168) tmp = Float64(t * Float64(a * -4.0)); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (j * (k * -27.0));
t_2 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (t <= -1.32e+231)
tmp = t_2;
elseif (t <= 1.8e-259)
tmp = t_1;
elseif (t <= 9.6e-195)
tmp = (b * c) - (x * (4.0 * i));
elseif (t <= 1.75e+67)
tmp = t_1;
elseif (t <= 4.8e+127)
tmp = t * (18.0 * (y * (x * z)));
elseif (t <= 3e+168)
tmp = t * (a * -4.0);
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.32e+231], t$95$2, If[LessEqual[t, 1.8e-259], t$95$1, If[LessEqual[t, 9.6e-195], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e+67], t$95$1, If[LessEqual[t, 4.8e+127], N[(t * N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+168], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -1.32 \cdot 10^{+231}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-259}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{-195}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+127}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+168}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.32000000000000005e231 or 2.9999999999999998e168 < t Initial program 72.3%
Simplified80.8%
Taylor expanded in a around 0 68.4%
expm1-log1p-u44.3%
expm1-udef44.0%
Applied egg-rr44.0%
expm1-def44.3%
expm1-log1p68.4%
associate-*r*64.2%
Simplified64.2%
Taylor expanded in t around 0 68.4%
*-commutative68.4%
associate-*r*68.3%
*-commutative68.3%
associate-*r*64.2%
Simplified64.2%
Taylor expanded in t around inf 67.5%
if -1.32000000000000005e231 < t < 1.7999999999999999e-259 or 9.6e-195 < t < 1.75e67Initial program 87.7%
Simplified89.5%
Taylor expanded in b around inf 56.2%
if 1.7999999999999999e-259 < t < 9.6e-195Initial program 90.8%
Simplified81.7%
Taylor expanded in t around 0 98.7%
Taylor expanded in i around inf 92.0%
*-commutative92.0%
*-commutative92.0%
associate-*r*92.0%
*-commutative92.0%
Simplified92.0%
if 1.75e67 < t < 4.8000000000000004e127Initial program 99.7%
Simplified94.0%
Taylor expanded in a around 0 76.7%
expm1-log1p-u46.1%
expm1-udef46.1%
Applied egg-rr46.1%
expm1-def46.1%
expm1-log1p76.7%
associate-*r*70.8%
Simplified70.8%
Taylor expanded in t around 0 76.7%
*-commutative76.7%
associate-*r*76.6%
*-commutative76.6%
associate-*r*76.7%
Simplified76.7%
Taylor expanded in t around inf 54.2%
*-commutative54.2%
associate-*l*54.3%
*-commutative54.3%
associate-*l*54.2%
Simplified54.2%
if 4.8000000000000004e127 < t < 2.9999999999999998e168Initial program 90.0%
Simplified100.0%
associate-*r*90.0%
distribute-rgt-out--90.0%
associate-*l*80.0%
*-commutative80.0%
*-commutative80.0%
Applied egg-rr80.0%
Taylor expanded in a around inf 61.5%
*-commutative61.5%
*-commutative61.5%
associate-*r*61.5%
Simplified61.5%
Final simplification59.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k)))))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -1.36e+203)
t_2
(if (<= t -5.5e-110)
t_1
(if (<= t -6.4e-164)
(* x (- (* i (- 4.0)) (* t (* z (* y -18.0)))))
(if (<= t 1.18e+61) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.36e+203) {
tmp = t_2;
} else if (t <= -5.5e-110) {
tmp = t_1;
} else if (t <= -6.4e-164) {
tmp = x * ((i * -4.0) - (t * (z * (y * -18.0))));
} else if (t <= 1.18e+61) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-1.36d+203)) then
tmp = t_2
else if (t <= (-5.5d-110)) then
tmp = t_1
else if (t <= (-6.4d-164)) then
tmp = x * ((i * -4.0d0) - (t * (z * (y * (-18.0d0)))))
else if (t <= 1.18d+61) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.36e+203) {
tmp = t_2;
} else if (t <= -5.5e-110) {
tmp = t_1;
} else if (t <= -6.4e-164) {
tmp = x * ((i * -4.0) - (t * (z * (y * -18.0))));
} else if (t <= 1.18e+61) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k))) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -1.36e+203: tmp = t_2 elif t <= -5.5e-110: tmp = t_1 elif t <= -6.4e-164: tmp = x * ((i * -4.0) - (t * (z * (y * -18.0)))) elif t <= 1.18e+61: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1.36e+203) tmp = t_2; elseif (t <= -5.5e-110) tmp = t_1; elseif (t <= -6.4e-164) tmp = Float64(x * Float64(Float64(i * Float64(-4.0)) - Float64(t * Float64(z * Float64(y * -18.0))))); elseif (t <= 1.18e+61) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -1.36e+203)
tmp = t_2;
elseif (t <= -5.5e-110)
tmp = t_1;
elseif (t <= -6.4e-164)
tmp = x * ((i * -4.0) - (t * (z * (y * -18.0))));
elseif (t <= 1.18e+61)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.36e+203], t$95$2, If[LessEqual[t, -5.5e-110], t$95$1, If[LessEqual[t, -6.4e-164], N[(x * N[(N[(i * (-4.0)), $MachinePrecision] - N[(t * N[(z * N[(y * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.18e+61], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.36 \cdot 10^{+203}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -6.4 \cdot 10^{-164}:\\
\;\;\;\;x \cdot \left(i \cdot \left(-4\right) - t \cdot \left(z \cdot \left(y \cdot -18\right)\right)\right)\\
\mathbf{elif}\;t \leq 1.18 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.36e203 or 1.18000000000000004e61 < t Initial program 78.6%
Simplified83.7%
Taylor expanded in t around inf 78.3%
if -1.36e203 < t < -5.4999999999999998e-110 or -6.4000000000000001e-164 < t < 1.18000000000000004e61Initial program 89.1%
Simplified89.1%
Taylor expanded in t around 0 76.3%
if -5.4999999999999998e-110 < t < -6.4000000000000001e-164Initial program 90.8%
Simplified90.8%
associate-*r*90.8%
distribute-rgt-out--90.8%
associate-*l*99.8%
*-commutative99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around -inf 80.3%
mul-1-neg80.3%
cancel-sign-sub-inv80.3%
associate-*r*80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in t around 0 80.3%
associate-*r*80.3%
*-commutative80.3%
associate-*r*73.8%
associate-*l*73.8%
associate-*l*80.4%
*-commutative80.4%
Simplified80.4%
Final simplification77.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= a -2.05e-147) (not (<= a 8.8e+21)))
(+ (* j (* k -27.0)) (+ (* -4.0 (* t a)) (+ (* b c) (* -4.0 (* x i)))))
(-
(+ (* b c) (* 18.0 (* t (* x (* y z)))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((a <= -2.05e-147) || !(a <= 8.8e+21)) {
tmp = (j * (k * -27.0)) + ((-4.0 * (t * a)) + ((b * c) + (-4.0 * (x * i))));
} else {
tmp = ((b * c) + (18.0 * (t * (x * (y * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((a <= (-2.05d-147)) .or. (.not. (a <= 8.8d+21))) then
tmp = (j * (k * (-27.0d0))) + (((-4.0d0) * (t * a)) + ((b * c) + ((-4.0d0) * (x * i))))
else
tmp = ((b * c) + (18.0d0 * (t * (x * (y * z))))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((a <= -2.05e-147) || !(a <= 8.8e+21)) {
tmp = (j * (k * -27.0)) + ((-4.0 * (t * a)) + ((b * c) + (-4.0 * (x * i))));
} else {
tmp = ((b * c) + (18.0 * (t * (x * (y * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (a <= -2.05e-147) or not (a <= 8.8e+21): tmp = (j * (k * -27.0)) + ((-4.0 * (t * a)) + ((b * c) + (-4.0 * (x * i)))) else: tmp = ((b * c) + (18.0 * (t * (x * (y * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((a <= -2.05e-147) || !(a <= 8.8e+21)) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(Float64(-4.0 * Float64(t * a)) + Float64(Float64(b * c) + Float64(-4.0 * Float64(x * i))))); else tmp = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((a <= -2.05e-147) || ~((a <= 8.8e+21)))
tmp = (j * (k * -27.0)) + ((-4.0 * (t * a)) + ((b * c) + (-4.0 * (x * i))));
else
tmp = ((b * c) + (18.0 * (t * (x * (y * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[a, -2.05e-147], N[Not[LessEqual[a, 8.8e+21]], $MachinePrecision]], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.05 \cdot 10^{-147} \lor \neg \left(a \leq 8.8 \cdot 10^{+21}\right):\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + \left(-4 \cdot \left(t \cdot a\right) + \left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if a < -2.05e-147 or 8.8e21 < a Initial program 83.0%
Simplified84.9%
Taylor expanded in y around 0 77.8%
if -2.05e-147 < a < 8.8e21Initial program 90.7%
Simplified93.8%
Taylor expanded in a around 0 91.4%
Final simplification83.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* i (- 4.0)) (* t (* z (* y -18.0))))))
(t_2 (+ (* b c) (* j (* k -27.0)))))
(if (<= x -380000000000.0)
t_1
(if (<= x 4.9e-137)
t_2
(if (<= x 6.4e-93)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= x 9e-9) t_2 t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((i * -4.0) - (t * (z * (y * -18.0))));
double t_2 = (b * c) + (j * (k * -27.0));
double tmp;
if (x <= -380000000000.0) {
tmp = t_1;
} else if (x <= 4.9e-137) {
tmp = t_2;
} else if (x <= 6.4e-93) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 9e-9) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((i * -4.0d0) - (t * (z * (y * (-18.0d0)))))
t_2 = (b * c) + (j * (k * (-27.0d0)))
if (x <= (-380000000000.0d0)) then
tmp = t_1
else if (x <= 4.9d-137) then
tmp = t_2
else if (x <= 6.4d-93) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (x <= 9d-9) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((i * -4.0) - (t * (z * (y * -18.0))));
double t_2 = (b * c) + (j * (k * -27.0));
double tmp;
if (x <= -380000000000.0) {
tmp = t_1;
} else if (x <= 4.9e-137) {
tmp = t_2;
} else if (x <= 6.4e-93) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 9e-9) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((i * -4.0) - (t * (z * (y * -18.0)))) t_2 = (b * c) + (j * (k * -27.0)) tmp = 0 if x <= -380000000000.0: tmp = t_1 elif x <= 4.9e-137: tmp = t_2 elif x <= 6.4e-93: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif x <= 9e-9: tmp = t_2 else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(i * Float64(-4.0)) - Float64(t * Float64(z * Float64(y * -18.0))))) t_2 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (x <= -380000000000.0) tmp = t_1; elseif (x <= 4.9e-137) tmp = t_2; elseif (x <= 6.4e-93) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (x <= 9e-9) tmp = t_2; else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((i * -4.0) - (t * (z * (y * -18.0))));
t_2 = (b * c) + (j * (k * -27.0));
tmp = 0.0;
if (x <= -380000000000.0)
tmp = t_1;
elseif (x <= 4.9e-137)
tmp = t_2;
elseif (x <= 6.4e-93)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (x <= 9e-9)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(i * (-4.0)), $MachinePrecision] - N[(t * N[(z * N[(y * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -380000000000.0], t$95$1, If[LessEqual[x, 4.9e-137], t$95$2, If[LessEqual[x, 6.4e-93], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9e-9], t$95$2, t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot \left(-4\right) - t \cdot \left(z \cdot \left(y \cdot -18\right)\right)\right)\\
t_2 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -380000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.9 \cdot 10^{-137}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 6.4 \cdot 10^{-93}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-9}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -3.8e11 or 8.99999999999999953e-9 < x Initial program 76.3%
Simplified80.8%
associate-*r*79.3%
distribute-rgt-out--76.3%
associate-*l*76.4%
*-commutative76.4%
*-commutative76.4%
Applied egg-rr76.4%
Taylor expanded in x around -inf 65.1%
mul-1-neg65.1%
cancel-sign-sub-inv65.1%
associate-*r*65.1%
metadata-eval65.1%
Simplified65.1%
Taylor expanded in t around 0 65.1%
associate-*r*65.1%
*-commutative65.1%
associate-*r*62.5%
associate-*l*62.5%
associate-*l*65.2%
*-commutative65.2%
Simplified65.2%
if -3.8e11 < x < 4.8999999999999996e-137 or 6.3999999999999997e-93 < x < 8.99999999999999953e-9Initial program 96.3%
Simplified94.7%
Taylor expanded in b around inf 66.9%
if 4.8999999999999996e-137 < x < 6.3999999999999997e-93Initial program 100.0%
Simplified100.0%
Taylor expanded in t around inf 95.6%
Final simplification66.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ (* b c) t_1)))
(if (<= x -1e-158)
(+ t_1 (* -4.0 (+ (* t a) (* x i))))
(if (<= x 4.8e-137)
t_2
(if (<= x 4.4e-88)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= x 4.2e-9)
t_2
(* x (- (* i (- 4.0)) (* t (* z (* y -18.0)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if (x <= -1e-158) {
tmp = t_1 + (-4.0 * ((t * a) + (x * i)));
} else if (x <= 4.8e-137) {
tmp = t_2;
} else if (x <= 4.4e-88) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 4.2e-9) {
tmp = t_2;
} else {
tmp = x * ((i * -4.0) - (t * (z * (y * -18.0))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (b * c) + t_1
if (x <= (-1d-158)) then
tmp = t_1 + ((-4.0d0) * ((t * a) + (x * i)))
else if (x <= 4.8d-137) then
tmp = t_2
else if (x <= 4.4d-88) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (x <= 4.2d-9) then
tmp = t_2
else
tmp = x * ((i * -4.0d0) - (t * (z * (y * (-18.0d0)))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if (x <= -1e-158) {
tmp = t_1 + (-4.0 * ((t * a) + (x * i)));
} else if (x <= 4.8e-137) {
tmp = t_2;
} else if (x <= 4.4e-88) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 4.2e-9) {
tmp = t_2;
} else {
tmp = x * ((i * -4.0) - (t * (z * (y * -18.0))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) + t_1 tmp = 0 if x <= -1e-158: tmp = t_1 + (-4.0 * ((t * a) + (x * i))) elif x <= 4.8e-137: tmp = t_2 elif x <= 4.4e-88: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif x <= 4.2e-9: tmp = t_2 else: tmp = x * ((i * -4.0) - (t * (z * (y * -18.0)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + t_1) tmp = 0.0 if (x <= -1e-158) tmp = Float64(t_1 + Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i)))); elseif (x <= 4.8e-137) tmp = t_2; elseif (x <= 4.4e-88) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (x <= 4.2e-9) tmp = t_2; else tmp = Float64(x * Float64(Float64(i * Float64(-4.0)) - Float64(t * Float64(z * Float64(y * -18.0))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (b * c) + t_1;
tmp = 0.0;
if (x <= -1e-158)
tmp = t_1 + (-4.0 * ((t * a) + (x * i)));
elseif (x <= 4.8e-137)
tmp = t_2;
elseif (x <= 4.4e-88)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (x <= 4.2e-9)
tmp = t_2;
else
tmp = x * ((i * -4.0) - (t * (z * (y * -18.0))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[x, -1e-158], N[(t$95$1 + N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.8e-137], t$95$2, If[LessEqual[x, 4.4e-88], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e-9], t$95$2, N[(x * N[(N[(i * (-4.0)), $MachinePrecision] - N[(t * N[(z * N[(y * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t_1\\
\mathbf{if}\;x \leq -1 \cdot 10^{-158}:\\
\;\;\;\;t_1 + -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-137}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{-88}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-9}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot \left(-4\right) - t \cdot \left(z \cdot \left(y \cdot -18\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.00000000000000006e-158Initial program 84.3%
Simplified87.2%
Taylor expanded in y around 0 72.9%
Taylor expanded in b around 0 61.4%
distribute-lft-out61.4%
*-commutative61.4%
*-commutative61.4%
Simplified61.4%
if -1.00000000000000006e-158 < x < 4.8000000000000001e-137 or 4.4000000000000001e-88 < x < 4.20000000000000039e-9Initial program 99.9%
Simplified97.3%
Taylor expanded in b around inf 75.5%
if 4.8000000000000001e-137 < x < 4.4000000000000001e-88Initial program 100.0%
Simplified100.0%
Taylor expanded in t around inf 95.6%
if 4.20000000000000039e-9 < x Initial program 71.8%
Simplified76.1%
associate-*r*74.7%
distribute-rgt-out--71.9%
associate-*l*74.6%
*-commutative74.6%
*-commutative74.6%
Applied egg-rr74.6%
Taylor expanded in x around -inf 71.3%
mul-1-neg71.3%
cancel-sign-sub-inv71.3%
associate-*r*71.3%
metadata-eval71.3%
Simplified71.3%
Taylor expanded in t around 0 71.3%
associate-*r*71.3%
*-commutative71.3%
associate-*r*67.3%
associate-*l*67.3%
associate-*l*71.3%
*-commutative71.3%
Simplified71.3%
Final simplification69.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))))
(if (<= (* b c) -3.4e+193)
(* b c)
(if (<= (* b c) 3.9e-149)
t_1
(if (<= (* b c) 2.1e+92)
(* t (* a -4.0))
(if (<= (* b c) 3.6e+155) t_1 (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double tmp;
if ((b * c) <= -3.4e+193) {
tmp = b * c;
} else if ((b * c) <= 3.9e-149) {
tmp = t_1;
} else if ((b * c) <= 2.1e+92) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 3.6e+155) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
if ((b * c) <= (-3.4d+193)) then
tmp = b * c
else if ((b * c) <= 3.9d-149) then
tmp = t_1
else if ((b * c) <= 2.1d+92) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 3.6d+155) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double tmp;
if ((b * c) <= -3.4e+193) {
tmp = b * c;
} else if ((b * c) <= 3.9e-149) {
tmp = t_1;
} else if ((b * c) <= 2.1e+92) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 3.6e+155) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) tmp = 0 if (b * c) <= -3.4e+193: tmp = b * c elif (b * c) <= 3.9e-149: tmp = t_1 elif (b * c) <= 2.1e+92: tmp = t * (a * -4.0) elif (b * c) <= 3.6e+155: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) tmp = 0.0 if (Float64(b * c) <= -3.4e+193) tmp = Float64(b * c); elseif (Float64(b * c) <= 3.9e-149) tmp = t_1; elseif (Float64(b * c) <= 2.1e+92) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 3.6e+155) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -27.0 * (j * k);
tmp = 0.0;
if ((b * c) <= -3.4e+193)
tmp = b * c;
elseif ((b * c) <= 3.9e-149)
tmp = t_1;
elseif ((b * c) <= 2.1e+92)
tmp = t * (a * -4.0);
elseif ((b * c) <= 3.6e+155)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.4e+193], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.9e-149], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2.1e+92], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.6e+155], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;b \cdot c \leq -3.4 \cdot 10^{+193}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 3.9 \cdot 10^{-149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 2.1 \cdot 10^{+92}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{+155}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.39999999999999986e193 or 3.60000000000000007e155 < (*.f64 b c) Initial program 79.8%
Simplified79.8%
associate-*r*81.4%
distribute-rgt-out--79.8%
associate-*l*78.1%
*-commutative78.1%
*-commutative78.1%
Applied egg-rr78.1%
Taylor expanded in b around inf 66.2%
if -3.39999999999999986e193 < (*.f64 b c) < 3.9000000000000002e-149 or 2.09999999999999986e92 < (*.f64 b c) < 3.60000000000000007e155Initial program 87.7%
Simplified90.3%
Taylor expanded in j around inf 34.3%
if 3.9000000000000002e-149 < (*.f64 b c) < 2.09999999999999986e92Initial program 88.8%
Simplified88.8%
associate-*r*88.8%
distribute-rgt-out--88.8%
associate-*l*80.7%
*-commutative80.7%
*-commutative80.7%
Applied egg-rr80.7%
Taylor expanded in a around inf 39.1%
*-commutative39.1%
*-commutative39.1%
associate-*r*39.1%
Simplified39.1%
Final simplification43.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -3.1e+193)
(* b c)
(if (<= (* b c) 1.3e-149)
(* -27.0 (* j k))
(if (<= (* b c) 3.1e+66)
(* t (* a -4.0))
(if (<= (* b c) 3.35e+137) (* -4.0 (* x i)) (* b c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -3.1e+193) {
tmp = b * c;
} else if ((b * c) <= 1.3e-149) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 3.1e+66) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 3.35e+137) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-3.1d+193)) then
tmp = b * c
else if ((b * c) <= 1.3d-149) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 3.1d+66) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 3.35d+137) then
tmp = (-4.0d0) * (x * i)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -3.1e+193) {
tmp = b * c;
} else if ((b * c) <= 1.3e-149) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 3.1e+66) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 3.35e+137) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -3.1e+193: tmp = b * c elif (b * c) <= 1.3e-149: tmp = -27.0 * (j * k) elif (b * c) <= 3.1e+66: tmp = t * (a * -4.0) elif (b * c) <= 3.35e+137: tmp = -4.0 * (x * i) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -3.1e+193) tmp = Float64(b * c); elseif (Float64(b * c) <= 1.3e-149) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 3.1e+66) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 3.35e+137) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -3.1e+193)
tmp = b * c;
elseif ((b * c) <= 1.3e-149)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 3.1e+66)
tmp = t * (a * -4.0);
elseif ((b * c) <= 3.35e+137)
tmp = -4.0 * (x * i);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -3.1e+193], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.3e-149], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.1e+66], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.35e+137], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -3.1 \cdot 10^{+193}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 1.3 \cdot 10^{-149}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 3.1 \cdot 10^{+66}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 3.35 \cdot 10^{+137}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.09999999999999986e193 or 3.3499999999999999e137 < (*.f64 b c) Initial program 80.1%
Simplified80.1%
associate-*r*81.7%
distribute-rgt-out--80.1%
associate-*l*78.4%
*-commutative78.4%
*-commutative78.4%
Applied egg-rr78.4%
Taylor expanded in b around inf 65.2%
if -3.09999999999999986e193 < (*.f64 b c) < 1.29999999999999999e-149Initial program 88.3%
Simplified90.4%
Taylor expanded in j around inf 33.6%
if 1.29999999999999999e-149 < (*.f64 b c) < 3.10000000000000019e66Initial program 86.7%
Simplified86.6%
associate-*r*86.7%
distribute-rgt-out--86.7%
associate-*l*80.2%
*-commutative80.2%
*-commutative80.2%
Applied egg-rr80.2%
Taylor expanded in a around inf 41.9%
*-commutative41.9%
*-commutative41.9%
associate-*r*41.9%
Simplified41.9%
if 3.10000000000000019e66 < (*.f64 b c) < 3.3499999999999999e137Initial program 85.6%
Simplified92.7%
associate-*r*92.7%
distribute-rgt-out--85.6%
associate-*l*78.6%
*-commutative78.6%
*-commutative78.6%
Applied egg-rr78.6%
Taylor expanded in i around inf 44.0%
*-commutative44.0%
*-commutative44.0%
Simplified44.0%
Final simplification43.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0))))
(t_2 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -350000000000.0)
t_2
(if (<= x 9.5e-138)
t_1
(if (<= x 7.5e-93)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= x 1.15e-8) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -350000000000.0) {
tmp = t_2;
} else if (x <= 9.5e-138) {
tmp = t_1;
} else if (x <= 7.5e-93) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 1.15e-8) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
t_2 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-350000000000.0d0)) then
tmp = t_2
else if (x <= 9.5d-138) then
tmp = t_1
else if (x <= 7.5d-93) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (x <= 1.15d-8) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -350000000000.0) {
tmp = t_2;
} else if (x <= 9.5e-138) {
tmp = t_1;
} else if (x <= 7.5e-93) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 1.15e-8) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (j * (k * -27.0)) t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -350000000000.0: tmp = t_2 elif x <= 9.5e-138: tmp = t_1 elif x <= 7.5e-93: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif x <= 1.15e-8: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -350000000000.0) tmp = t_2; elseif (x <= 9.5e-138) tmp = t_1; elseif (x <= 7.5e-93) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (x <= 1.15e-8) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (j * (k * -27.0));
t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -350000000000.0)
tmp = t_2;
elseif (x <= 9.5e-138)
tmp = t_1;
elseif (x <= 7.5e-93)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (x <= 1.15e-8)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -350000000000.0], t$95$2, If[LessEqual[x, 9.5e-138], t$95$1, If[LessEqual[x, 7.5e-93], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e-8], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -350000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-138}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-93}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -3.5e11 or 1.15e-8 < x Initial program 76.3%
Simplified80.8%
Taylor expanded in x around inf 65.1%
if -3.5e11 < x < 9.49999999999999997e-138 or 7.50000000000000034e-93 < x < 1.15e-8Initial program 96.3%
Simplified94.7%
Taylor expanded in b around inf 66.9%
if 9.49999999999999997e-138 < x < 7.50000000000000034e-93Initial program 100.0%
Simplified100.0%
Taylor expanded in t around inf 95.6%
Final simplification66.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (or (<= z -5e-53) (not (<= z 1.45e+252)))
(+ t_1 (* x (* t (* y (* 18.0 z)))))
(+ t_1 (+ (* -4.0 (* t a)) (+ (* b c) (* -4.0 (* x i))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((z <= -5e-53) || !(z <= 1.45e+252)) {
tmp = t_1 + (x * (t * (y * (18.0 * z))));
} else {
tmp = t_1 + ((-4.0 * (t * a)) + ((b * c) + (-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.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if ((z <= (-5d-53)) .or. (.not. (z <= 1.45d+252))) then
tmp = t_1 + (x * (t * (y * (18.0d0 * z))))
else
tmp = t_1 + (((-4.0d0) * (t * a)) + ((b * c) + ((-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;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if ((z <= -5e-53) || !(z <= 1.45e+252)) {
tmp = t_1 + (x * (t * (y * (18.0 * z))));
} else {
tmp = t_1 + ((-4.0 * (t * a)) + ((b * c) + (-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]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if (z <= -5e-53) or not (z <= 1.45e+252): tmp = t_1 + (x * (t * (y * (18.0 * z)))) else: tmp = t_1 + ((-4.0 * (t * a)) + ((b * c) + (-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]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if ((z <= -5e-53) || !(z <= 1.45e+252)) tmp = Float64(t_1 + Float64(x * Float64(t * Float64(y * Float64(18.0 * z))))); else tmp = Float64(t_1 + Float64(Float64(-4.0 * Float64(t * a)) + Float64(Float64(b * c) + 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if ((z <= -5e-53) || ~((z <= 1.45e+252)))
tmp = t_1 + (x * (t * (y * (18.0 * z))));
else
tmp = t_1 + ((-4.0 * (t * a)) + ((b * c) + (-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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -5e-53], N[Not[LessEqual[z, 1.45e+252]], $MachinePrecision]], N[(t$95$1 + N[(x * N[(t * N[(y * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;z \leq -5 \cdot 10^{-53} \lor \neg \left(z \leq 1.45 \cdot 10^{+252}\right):\\
\;\;\;\;t_1 + x \cdot \left(t \cdot \left(y \cdot \left(18 \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(-4 \cdot \left(t \cdot a\right) + \left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if z < -5e-53 or 1.44999999999999998e252 < z Initial program 80.8%
Simplified81.9%
Taylor expanded in y around inf 59.3%
*-commutative59.3%
associate-*r*60.7%
associate-*l*60.7%
*-commutative60.7%
*-commutative60.7%
associate-*l*60.7%
*-commutative60.7%
associate-*l*60.7%
*-commutative60.7%
associate-*l*60.7%
Simplified60.7%
if -5e-53 < z < 1.44999999999999998e252Initial program 88.6%
Simplified91.6%
Taylor expanded in y around 0 82.5%
Final simplification75.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= y -8.6e-76)
(-
(+ (* b c) (* 18.0 (* (* y z) (* x t))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(if (<= y 1.3e+23)
(+ (* j (* k -27.0)) (+ (* -4.0 (* t a)) (+ (* b c) (* -4.0 (* x i)))))
(* t (* 18.0 (* y (* x z)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -8.6e-76) {
tmp = ((b * c) + (18.0 * ((y * z) * (x * t)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else if (y <= 1.3e+23) {
tmp = (j * (k * -27.0)) + ((-4.0 * (t * a)) + ((b * c) + (-4.0 * (x * i))));
} else {
tmp = t * (18.0 * (y * (x * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (y <= (-8.6d-76)) then
tmp = ((b * c) + (18.0d0 * ((y * z) * (x * t)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else if (y <= 1.3d+23) then
tmp = (j * (k * (-27.0d0))) + (((-4.0d0) * (t * a)) + ((b * c) + ((-4.0d0) * (x * i))))
else
tmp = t * (18.0d0 * (y * (x * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -8.6e-76) {
tmp = ((b * c) + (18.0 * ((y * z) * (x * t)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else if (y <= 1.3e+23) {
tmp = (j * (k * -27.0)) + ((-4.0 * (t * a)) + ((b * c) + (-4.0 * (x * i))));
} else {
tmp = t * (18.0 * (y * (x * z)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if y <= -8.6e-76: tmp = ((b * c) + (18.0 * ((y * z) * (x * t)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) elif y <= 1.3e+23: tmp = (j * (k * -27.0)) + ((-4.0 * (t * a)) + ((b * c) + (-4.0 * (x * i)))) else: tmp = t * (18.0 * (y * (x * z))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -8.6e-76) tmp = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(Float64(y * z) * Float64(x * t)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); elseif (y <= 1.3e+23) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(Float64(-4.0 * Float64(t * a)) + Float64(Float64(b * c) + Float64(-4.0 * Float64(x * i))))); else tmp = Float64(t * Float64(18.0 * Float64(y * Float64(x * z)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (y <= -8.6e-76)
tmp = ((b * c) + (18.0 * ((y * z) * (x * t)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
elseif (y <= 1.3e+23)
tmp = (j * (k * -27.0)) + ((-4.0 * (t * a)) + ((b * c) + (-4.0 * (x * i))));
else
tmp = t * (18.0 * (y * (x * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -8.6e-76], N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+23], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{-76}:\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+23}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + \left(-4 \cdot \left(t \cdot a\right) + \left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if y < -8.5999999999999998e-76Initial program 78.8%
Simplified78.9%
Taylor expanded in a around 0 75.4%
expm1-log1p-u55.9%
expm1-udef53.9%
Applied egg-rr53.9%
expm1-def55.9%
expm1-log1p75.4%
associate-*r*78.4%
Simplified78.4%
if -8.5999999999999998e-76 < y < 1.29999999999999996e23Initial program 94.5%
Simplified96.3%
Taylor expanded in y around 0 86.0%
if 1.29999999999999996e23 < y Initial program 80.7%
Simplified85.9%
Taylor expanded in a around 0 73.9%
expm1-log1p-u54.3%
expm1-udef54.3%
Applied egg-rr54.3%
expm1-def54.3%
expm1-log1p73.9%
associate-*r*72.2%
Simplified72.2%
Taylor expanded in t around 0 73.9%
*-commutative73.9%
associate-*r*73.8%
*-commutative73.8%
associate-*r*75.6%
Simplified75.6%
Taylor expanded in t around inf 43.5%
*-commutative43.5%
associate-*l*43.5%
*-commutative43.5%
associate-*l*45.2%
Simplified45.2%
Final simplification74.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= y -4.15e-75)
(-
(+ (* b c) (* 18.0 (* x (* y (* z t)))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(if (<= y 1.3e+23)
(+ (* j (* k -27.0)) (+ (* -4.0 (* t a)) (+ (* b c) (* -4.0 (* x i)))))
(* t (* 18.0 (* y (* x z)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -4.15e-75) {
tmp = ((b * c) + (18.0 * (x * (y * (z * t))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else if (y <= 1.3e+23) {
tmp = (j * (k * -27.0)) + ((-4.0 * (t * a)) + ((b * c) + (-4.0 * (x * i))));
} else {
tmp = t * (18.0 * (y * (x * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (y <= (-4.15d-75)) then
tmp = ((b * c) + (18.0d0 * (x * (y * (z * t))))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else if (y <= 1.3d+23) then
tmp = (j * (k * (-27.0d0))) + (((-4.0d0) * (t * a)) + ((b * c) + ((-4.0d0) * (x * i))))
else
tmp = t * (18.0d0 * (y * (x * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -4.15e-75) {
tmp = ((b * c) + (18.0 * (x * (y * (z * t))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else if (y <= 1.3e+23) {
tmp = (j * (k * -27.0)) + ((-4.0 * (t * a)) + ((b * c) + (-4.0 * (x * i))));
} else {
tmp = t * (18.0 * (y * (x * z)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if y <= -4.15e-75: tmp = ((b * c) + (18.0 * (x * (y * (z * t))))) - ((x * (4.0 * i)) + (j * (27.0 * k))) elif y <= 1.3e+23: tmp = (j * (k * -27.0)) + ((-4.0 * (t * a)) + ((b * c) + (-4.0 * (x * i)))) else: tmp = t * (18.0 * (y * (x * z))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -4.15e-75) tmp = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(x * Float64(y * Float64(z * t))))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); elseif (y <= 1.3e+23) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(Float64(-4.0 * Float64(t * a)) + Float64(Float64(b * c) + Float64(-4.0 * Float64(x * i))))); else tmp = Float64(t * Float64(18.0 * Float64(y * Float64(x * z)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (y <= -4.15e-75)
tmp = ((b * c) + (18.0 * (x * (y * (z * t))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
elseif (y <= 1.3e+23)
tmp = (j * (k * -27.0)) + ((-4.0 * (t * a)) + ((b * c) + (-4.0 * (x * i))));
else
tmp = t * (18.0 * (y * (x * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -4.15e-75], N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(x * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+23], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.15 \cdot 10^{-75}:\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+23}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + \left(-4 \cdot \left(t \cdot a\right) + \left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if y < -4.14999999999999987e-75Initial program 78.8%
Simplified78.9%
Taylor expanded in a around 0 75.4%
expm1-log1p-u55.9%
expm1-udef53.9%
Applied egg-rr53.9%
expm1-def55.9%
expm1-log1p75.4%
associate-*r*78.4%
Simplified78.4%
Taylor expanded in t around 0 75.4%
*-commutative75.4%
associate-*r*78.6%
*-commutative78.6%
associate-*r*81.9%
Simplified81.9%
if -4.14999999999999987e-75 < y < 1.29999999999999996e23Initial program 94.5%
Simplified96.3%
Taylor expanded in y around 0 86.0%
if 1.29999999999999996e23 < y Initial program 80.7%
Simplified85.9%
Taylor expanded in a around 0 73.9%
expm1-log1p-u54.3%
expm1-udef54.3%
Applied egg-rr54.3%
expm1-def54.3%
expm1-log1p73.9%
associate-*r*72.2%
Simplified72.2%
Taylor expanded in t around 0 73.9%
*-commutative73.9%
associate-*r*73.8%
*-commutative73.8%
associate-*r*75.6%
Simplified75.6%
Taylor expanded in t around inf 43.5%
*-commutative43.5%
associate-*l*43.5%
*-commutative43.5%
associate-*l*45.2%
Simplified45.2%
Final simplification75.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* t (* x (* y z))))))
(if (<= t -4.4e+231)
t_1
(if (<= t 1.5e+64)
(+ (* b c) (* j (* k -27.0)))
(if (<= t 3.3e+128)
(* t (* 18.0 (* y (* x z))))
(if (<= t 1.55e+174) (* t (* a -4.0)) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -4.4e+231) {
tmp = t_1;
} else if (t <= 1.5e+64) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 3.3e+128) {
tmp = t * (18.0 * (y * (x * z)));
} else if (t <= 1.55e+174) {
tmp = t * (a * -4.0);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (t * (x * (y * z)))
if (t <= (-4.4d+231)) then
tmp = t_1
else if (t <= 1.5d+64) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (t <= 3.3d+128) then
tmp = t * (18.0d0 * (y * (x * z)))
else if (t <= 1.55d+174) then
tmp = t * (a * (-4.0d0))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -4.4e+231) {
tmp = t_1;
} else if (t <= 1.5e+64) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 3.3e+128) {
tmp = t * (18.0 * (y * (x * z)));
} else if (t <= 1.55e+174) {
tmp = t * (a * -4.0);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (t * (x * (y * z))) tmp = 0 if t <= -4.4e+231: tmp = t_1 elif t <= 1.5e+64: tmp = (b * c) + (j * (k * -27.0)) elif t <= 3.3e+128: tmp = t * (18.0 * (y * (x * z))) elif t <= 1.55e+174: tmp = t * (a * -4.0) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (t <= -4.4e+231) tmp = t_1; elseif (t <= 1.5e+64) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (t <= 3.3e+128) tmp = Float64(t * Float64(18.0 * Float64(y * Float64(x * z)))); elseif (t <= 1.55e+174) tmp = Float64(t * Float64(a * -4.0)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (t <= -4.4e+231)
tmp = t_1;
elseif (t <= 1.5e+64)
tmp = (b * c) + (j * (k * -27.0));
elseif (t <= 3.3e+128)
tmp = t * (18.0 * (y * (x * z)));
elseif (t <= 1.55e+174)
tmp = t * (a * -4.0);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e+231], t$95$1, If[LessEqual[t, 1.5e+64], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e+128], N[(t * N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e+174], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{+231}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+64}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+128}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+174}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.39999999999999983e231 or 1.55e174 < t Initial program 72.3%
Simplified80.8%
Taylor expanded in a around 0 68.4%
expm1-log1p-u44.3%
expm1-udef44.0%
Applied egg-rr44.0%
expm1-def44.3%
expm1-log1p68.4%
associate-*r*64.2%
Simplified64.2%
Taylor expanded in t around 0 68.4%
*-commutative68.4%
associate-*r*68.3%
*-commutative68.3%
associate-*r*64.2%
Simplified64.2%
Taylor expanded in t around inf 67.5%
if -4.39999999999999983e231 < t < 1.5000000000000001e64Initial program 87.9%
Simplified89.0%
Taylor expanded in b around inf 55.7%
if 1.5000000000000001e64 < t < 3.3000000000000001e128Initial program 99.7%
Simplified94.0%
Taylor expanded in a around 0 76.7%
expm1-log1p-u46.1%
expm1-udef46.1%
Applied egg-rr46.1%
expm1-def46.1%
expm1-log1p76.7%
associate-*r*70.8%
Simplified70.8%
Taylor expanded in t around 0 76.7%
*-commutative76.7%
associate-*r*76.6%
*-commutative76.6%
associate-*r*76.7%
Simplified76.7%
Taylor expanded in t around inf 54.2%
*-commutative54.2%
associate-*l*54.3%
*-commutative54.3%
associate-*l*54.2%
Simplified54.2%
if 3.3000000000000001e128 < t < 1.55e174Initial program 90.0%
Simplified100.0%
associate-*r*90.0%
distribute-rgt-out--90.0%
associate-*l*80.0%
*-commutative80.0%
*-commutative80.0%
Applied egg-rr80.0%
Taylor expanded in a around inf 61.5%
*-commutative61.5%
*-commutative61.5%
associate-*r*61.5%
Simplified61.5%
Final simplification58.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -7.3e+146)
t_1
(if (<= t -3.15e-80)
(+ (* -4.0 (* x i)) (* -27.0 (* j k)))
(if (<= t 9.2e+61) (+ (* b c) (* j (* k -27.0))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -7.3e+146) {
tmp = t_1;
} else if (t <= -3.15e-80) {
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
} else if (t <= 9.2e+61) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-7.3d+146)) then
tmp = t_1
else if (t <= (-3.15d-80)) then
tmp = ((-4.0d0) * (x * i)) + ((-27.0d0) * (j * k))
else if (t <= 9.2d+61) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -7.3e+146) {
tmp = t_1;
} else if (t <= -3.15e-80) {
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
} else if (t <= 9.2e+61) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -7.3e+146: tmp = t_1 elif t <= -3.15e-80: tmp = (-4.0 * (x * i)) + (-27.0 * (j * k)) elif t <= 9.2e+61: tmp = (b * c) + (j * (k * -27.0)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -7.3e+146) tmp = t_1; elseif (t <= -3.15e-80) tmp = Float64(Float64(-4.0 * Float64(x * i)) + Float64(-27.0 * Float64(j * k))); elseif (t <= 9.2e+61) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -7.3e+146)
tmp = t_1;
elseif (t <= -3.15e-80)
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
elseif (t <= 9.2e+61)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.3e+146], t$95$1, If[LessEqual[t, -3.15e-80], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.2e+61], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -7.3 \cdot 10^{+146}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3.15 \cdot 10^{-80}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{+61}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -7.30000000000000034e146 or 9.1999999999999998e61 < t Initial program 80.3%
Simplified85.5%
Taylor expanded in t around inf 74.4%
if -7.30000000000000034e146 < t < -3.14999999999999983e-80Initial program 89.4%
Simplified86.8%
Taylor expanded in i around inf 61.1%
associate-*r*61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in x around 0 61.2%
if -3.14999999999999983e-80 < t < 9.1999999999999998e61Initial program 89.3%
Simplified90.2%
Taylor expanded in b around inf 58.1%
Final simplification64.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -2.9e+193) (not (<= (* b c) 3.9e+151))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.9e+193) || !((b * c) <= 3.9e+151)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-2.9d+193)) .or. (.not. ((b * c) <= 3.9d+151))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.9e+193) || !((b * c) <= 3.9e+151)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -2.9e+193) or not ((b * c) <= 3.9e+151): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -2.9e+193) || !(Float64(b * c) <= 3.9e+151)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -2.9e+193) || ~(((b * c) <= 3.9e+151)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -2.9e+193], N[Not[LessEqual[N[(b * c), $MachinePrecision], 3.9e+151]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.9 \cdot 10^{+193} \lor \neg \left(b \cdot c \leq 3.9 \cdot 10^{+151}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.90000000000000013e193 or 3.89999999999999976e151 < (*.f64 b c) Initial program 79.8%
Simplified79.8%
associate-*r*81.4%
distribute-rgt-out--79.8%
associate-*l*78.1%
*-commutative78.1%
*-commutative78.1%
Applied egg-rr78.1%
Taylor expanded in b around inf 66.2%
if -2.90000000000000013e193 < (*.f64 b c) < 3.89999999999999976e151Initial program 87.9%
Simplified90.1%
Taylor expanded in j around inf 32.5%
Final simplification40.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 85.9%
Simplified87.5%
associate-*r*87.8%
distribute-rgt-out--85.9%
associate-*l*83.9%
*-commutative83.9%
*-commutative83.9%
Applied egg-rr83.9%
Taylor expanded in b around inf 23.3%
Final simplification23.3%
(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 2024024
(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)))