
(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 18 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 t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* i -4.0))))
(* j (* k -27.0)))
(* 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 = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (i * -4.0)))) + (j * (k * -27.0));
} 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(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 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); 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[(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:\\
\;\;\;\;\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}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 95.0%
Simplified97.5%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified16.1%
Taylor expanded in x around inf 71.1%
Final simplification94.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* (* (* (* x 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 #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 95.0%
Simplified97.1%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified16.1%
Taylor expanded in x around inf 71.1%
Final simplification93.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 (* j (* k -27.0)))
(t_2 (* 18.0 (* t (* x (* y z)))))
(t_3 (* -4.0 (* t a))))
(if (<= t -9e+113)
t_2
(if (<= t -420000000.0)
(+ t_1 t_3)
(if (<= t 4.4e-110)
(- (* b c) (* k (* j 27.0)))
(if (<= t 1.56e-80)
(+ t_1 (* -4.0 (* x i)))
(if (<= t 1.05e+181)
(* b (+ c (* -27.0 (* j (/ k b)))))
(if (<= t 1.65e+213) (+ (* b c) t_3) t_2))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = 18.0 * (t * (x * (y * z)));
double t_3 = -4.0 * (t * a);
double tmp;
if (t <= -9e+113) {
tmp = t_2;
} else if (t <= -420000000.0) {
tmp = t_1 + t_3;
} else if (t <= 4.4e-110) {
tmp = (b * c) - (k * (j * 27.0));
} else if (t <= 1.56e-80) {
tmp = t_1 + (-4.0 * (x * i));
} else if (t <= 1.05e+181) {
tmp = b * (c + (-27.0 * (j * (k / b))));
} else if (t <= 1.65e+213) {
tmp = (b * c) + t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = 18.0d0 * (t * (x * (y * z)))
t_3 = (-4.0d0) * (t * a)
if (t <= (-9d+113)) then
tmp = t_2
else if (t <= (-420000000.0d0)) then
tmp = t_1 + t_3
else if (t <= 4.4d-110) then
tmp = (b * c) - (k * (j * 27.0d0))
else if (t <= 1.56d-80) then
tmp = t_1 + ((-4.0d0) * (x * i))
else if (t <= 1.05d+181) then
tmp = b * (c + ((-27.0d0) * (j * (k / b))))
else if (t <= 1.65d+213) then
tmp = (b * c) + t_3
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = 18.0 * (t * (x * (y * z)));
double t_3 = -4.0 * (t * a);
double tmp;
if (t <= -9e+113) {
tmp = t_2;
} else if (t <= -420000000.0) {
tmp = t_1 + t_3;
} else if (t <= 4.4e-110) {
tmp = (b * c) - (k * (j * 27.0));
} else if (t <= 1.56e-80) {
tmp = t_1 + (-4.0 * (x * i));
} else if (t <= 1.05e+181) {
tmp = b * (c + (-27.0 * (j * (k / b))));
} else if (t <= 1.65e+213) {
tmp = (b * c) + t_3;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = 18.0 * (t * (x * (y * z))) t_3 = -4.0 * (t * a) tmp = 0 if t <= -9e+113: tmp = t_2 elif t <= -420000000.0: tmp = t_1 + t_3 elif t <= 4.4e-110: tmp = (b * c) - (k * (j * 27.0)) elif t <= 1.56e-80: tmp = t_1 + (-4.0 * (x * i)) elif t <= 1.05e+181: tmp = b * (c + (-27.0 * (j * (k / b)))) elif t <= 1.65e+213: tmp = (b * c) + t_3 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) t_3 = Float64(-4.0 * Float64(t * a)) tmp = 0.0 if (t <= -9e+113) tmp = t_2; elseif (t <= -420000000.0) tmp = Float64(t_1 + t_3); elseif (t <= 4.4e-110) tmp = Float64(Float64(b * c) - Float64(k * Float64(j * 27.0))); elseif (t <= 1.56e-80) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); elseif (t <= 1.05e+181) tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(j * Float64(k / b))))); elseif (t <= 1.65e+213) tmp = Float64(Float64(b * c) + t_3); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = 18.0 * (t * (x * (y * z)));
t_3 = -4.0 * (t * a);
tmp = 0.0;
if (t <= -9e+113)
tmp = t_2;
elseif (t <= -420000000.0)
tmp = t_1 + t_3;
elseif (t <= 4.4e-110)
tmp = (b * c) - (k * (j * 27.0));
elseif (t <= 1.56e-80)
tmp = t_1 + (-4.0 * (x * i));
elseif (t <= 1.05e+181)
tmp = b * (c + (-27.0 * (j * (k / b))));
elseif (t <= 1.65e+213)
tmp = (b * c) + t_3;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+113], t$95$2, If[LessEqual[t, -420000000.0], N[(t$95$1 + t$95$3), $MachinePrecision], If[LessEqual[t, 4.4e-110], N[(N[(b * c), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.56e-80], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+181], N[(b * N[(c + N[(-27.0 * N[(j * N[(k / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+213], N[(N[(b * c), $MachinePrecision] + t$95$3), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
t_3 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t \leq -9 \cdot 10^{+113}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -420000000:\\
\;\;\;\;t\_1 + t\_3\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-110}:\\
\;\;\;\;b \cdot c - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;t \leq 1.56 \cdot 10^{-80}:\\
\;\;\;\;t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+181}:\\
\;\;\;\;b \cdot \left(c + -27 \cdot \left(j \cdot \frac{k}{b}\right)\right)\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+213}:\\
\;\;\;\;b \cdot c + t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -9.0000000000000001e113 or 1.6500000000000001e213 < t Initial program 73.0%
Simplified76.9%
Taylor expanded in x around inf 75.6%
Taylor expanded in t around inf 75.3%
if -9.0000000000000001e113 < t < -4.2e8Initial program 91.2%
Simplified91.2%
Taylor expanded in a around inf 60.8%
*-commutative60.8%
Simplified60.8%
if -4.2e8 < t < 4.3999999999999999e-110Initial program 87.1%
Simplified91.9%
Taylor expanded in t around 0 82.9%
Taylor expanded in i around 0 63.7%
associate-*r*63.8%
*-commutative63.8%
*-commutative63.8%
*-commutative63.8%
Simplified63.8%
if 4.3999999999999999e-110 < t < 1.55999999999999994e-80Initial program 90.0%
Simplified90.0%
Taylor expanded in i around inf 80.2%
if 1.55999999999999994e-80 < t < 1.04999999999999999e181Initial program 82.0%
Simplified84.3%
Taylor expanded in t around 0 60.2%
Taylor expanded in i around 0 55.7%
associate-*r*55.8%
*-commutative55.8%
*-commutative55.8%
*-commutative55.8%
Simplified55.8%
Taylor expanded in b around inf 55.6%
*-commutative55.6%
associate-/l*60.2%
Simplified60.2%
if 1.04999999999999999e181 < t < 1.6500000000000001e213Initial program 76.5%
Simplified87.3%
Taylor expanded in x around 0 88.3%
Taylor expanded in j around 0 88.3%
Final simplification66.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* t (* x (* y z))))))
(if (<= t -5.5e+113)
t_1
(if (<= t 2.2e-103)
(- (* b c) (* k (* j 27.0)))
(if (<= t 1.32e-80)
(+ (* j (* k -27.0)) (* -4.0 (* x i)))
(if (<= t 2.2e+182)
(* b (+ c (* -27.0 (* j (/ k b)))))
(if (<= t 1.02e+213) (+ (* b c) (* -4.0 (* t a))) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -5.5e+113) {
tmp = t_1;
} else if (t <= 2.2e-103) {
tmp = (b * c) - (k * (j * 27.0));
} else if (t <= 1.32e-80) {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
} else if (t <= 2.2e+182) {
tmp = b * (c + (-27.0 * (j * (k / b))));
} else if (t <= 1.02e+213) {
tmp = (b * c) + (-4.0 * (t * a));
} 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 <= (-5.5d+113)) then
tmp = t_1
else if (t <= 2.2d-103) then
tmp = (b * c) - (k * (j * 27.0d0))
else if (t <= 1.32d-80) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (x * i))
else if (t <= 2.2d+182) then
tmp = b * (c + ((-27.0d0) * (j * (k / b))))
else if (t <= 1.02d+213) then
tmp = (b * c) + ((-4.0d0) * (t * a))
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 <= -5.5e+113) {
tmp = t_1;
} else if (t <= 2.2e-103) {
tmp = (b * c) - (k * (j * 27.0));
} else if (t <= 1.32e-80) {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
} else if (t <= 2.2e+182) {
tmp = b * (c + (-27.0 * (j * (k / b))));
} else if (t <= 1.02e+213) {
tmp = (b * c) + (-4.0 * (t * a));
} 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 <= -5.5e+113: tmp = t_1 elif t <= 2.2e-103: tmp = (b * c) - (k * (j * 27.0)) elif t <= 1.32e-80: tmp = (j * (k * -27.0)) + (-4.0 * (x * i)) elif t <= 2.2e+182: tmp = b * (c + (-27.0 * (j * (k / b)))) elif t <= 1.02e+213: tmp = (b * c) + (-4.0 * (t * a)) 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 <= -5.5e+113) tmp = t_1; elseif (t <= 2.2e-103) tmp = Float64(Float64(b * c) - Float64(k * Float64(j * 27.0))); elseif (t <= 1.32e-80) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(x * i))); elseif (t <= 2.2e+182) tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(j * Float64(k / b))))); elseif (t <= 1.02e+213) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); 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 <= -5.5e+113)
tmp = t_1;
elseif (t <= 2.2e-103)
tmp = (b * c) - (k * (j * 27.0));
elseif (t <= 1.32e-80)
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
elseif (t <= 2.2e+182)
tmp = b * (c + (-27.0 * (j * (k / b))));
elseif (t <= 1.02e+213)
tmp = (b * c) + (-4.0 * (t * a));
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, -5.5e+113], t$95$1, If[LessEqual[t, 2.2e-103], N[(N[(b * c), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.32e-80], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e+182], N[(b * N[(c + N[(-27.0 * N[(j * N[(k / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.02e+213], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $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 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-103}:\\
\;\;\;\;b \cdot c - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;t \leq 1.32 \cdot 10^{-80}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+182}:\\
\;\;\;\;b \cdot \left(c + -27 \cdot \left(j \cdot \frac{k}{b}\right)\right)\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+213}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.5000000000000001e113 or 1.02e213 < t Initial program 73.0%
Simplified76.9%
Taylor expanded in x around inf 75.6%
Taylor expanded in t around inf 75.3%
if -5.5000000000000001e113 < t < 2.1999999999999999e-103Initial program 87.7%
Simplified91.8%
Taylor expanded in t around 0 77.9%
Taylor expanded in i around 0 60.4%
associate-*r*60.4%
*-commutative60.4%
*-commutative60.4%
*-commutative60.4%
Simplified60.4%
if 2.1999999999999999e-103 < t < 1.31999999999999995e-80Initial program 90.0%
Simplified90.0%
Taylor expanded in i around inf 80.2%
if 1.31999999999999995e-80 < t < 2.19999999999999997e182Initial program 82.0%
Simplified84.3%
Taylor expanded in t around 0 60.2%
Taylor expanded in i around 0 55.7%
associate-*r*55.8%
*-commutative55.8%
*-commutative55.8%
*-commutative55.8%
Simplified55.8%
Taylor expanded in b around inf 55.6%
*-commutative55.6%
associate-/l*60.2%
Simplified60.2%
if 2.19999999999999997e182 < t < 1.02e213Initial program 76.5%
Simplified87.3%
Taylor expanded in x around 0 88.3%
Taylor expanded in j around 0 88.3%
Final simplification65.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z -2.15e+21)
(* y (+ (* -27.0 (/ (* j k) y)) (* 18.0 (* t (* x z)))))
(if (<= z 2.4e+60)
(- (- (- (* b c) (* 4.0 (* t a))) (* (* x 4.0) i)) (* k (* j 27.0)))
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 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 tmp;
if (z <= -2.15e+21) {
tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z))));
} else if (z <= 2.4e+60) {
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - (k * (j * 27.0));
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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) :: tmp
if (z <= (-2.15d+21)) then
tmp = y * (((-27.0d0) * ((j * k) / y)) + (18.0d0 * (t * (x * z))))
else if (z <= 2.4d+60) then
tmp = (((b * c) - (4.0d0 * (t * a))) - ((x * 4.0d0) * i)) - (k * (j * 27.0d0))
else
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (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 tmp;
if (z <= -2.15e+21) {
tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z))));
} else if (z <= 2.4e+60) {
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - (k * (j * 27.0));
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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): tmp = 0 if z <= -2.15e+21: tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z)))) elif z <= 2.4e+60: tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - (k * (j * 27.0)) else: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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) tmp = 0.0 if (z <= -2.15e+21) tmp = Float64(y * Float64(Float64(-27.0 * Float64(Float64(j * k) / y)) + Float64(18.0 * Float64(t * Float64(x * z))))); elseif (z <= 2.4e+60) tmp = Float64(Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(x * 4.0) * i)) - Float64(k * Float64(j * 27.0))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (z <= -2.15e+21)
tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z))));
elseif (z <= 2.4e+60)
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - (k * (j * 27.0));
else
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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_] := If[LessEqual[z, -2.15e+21], N[(y * N[(N[(-27.0 * N[(N[(j * k), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e+60], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+21}:\\
\;\;\;\;y \cdot \left(-27 \cdot \frac{j \cdot k}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+60}:\\
\;\;\;\;\left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if z < -2.15e21Initial program 81.3%
Simplified78.5%
Taylor expanded in y around inf 60.2%
associate-*r*61.7%
Simplified61.7%
Taylor expanded in y around inf 58.6%
if -2.15e21 < z < 2.4e60Initial program 86.7%
Taylor expanded in x around 0 89.2%
if 2.4e60 < z Initial program 76.6%
Simplified80.9%
Taylor expanded in j around 0 70.9%
Final simplification78.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z -2.25e+21)
(* y (+ (* -27.0 (/ (* j k) y)) (* 18.0 (* t (* x z)))))
(if (<= z 2.1e+154)
(- (- (- (* b c) (* 4.0 (* t a))) (* (* x 4.0) i)) (* k (* j 27.0)))
(* z (+ (* -27.0 (/ (* j k) z)) (* 18.0 (* t (* x y))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= -2.25e+21) {
tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z))));
} else if (z <= 2.1e+154) {
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - (k * (j * 27.0));
} else {
tmp = z * ((-27.0 * ((j * k) / z)) + (18.0 * (t * (x * y))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (z <= (-2.25d+21)) then
tmp = y * (((-27.0d0) * ((j * k) / y)) + (18.0d0 * (t * (x * z))))
else if (z <= 2.1d+154) then
tmp = (((b * c) - (4.0d0 * (t * a))) - ((x * 4.0d0) * i)) - (k * (j * 27.0d0))
else
tmp = z * (((-27.0d0) * ((j * k) / z)) + (18.0d0 * (t * (x * y))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= -2.25e+21) {
tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z))));
} else if (z <= 2.1e+154) {
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - (k * (j * 27.0));
} else {
tmp = z * ((-27.0 * ((j * k) / z)) + (18.0 * (t * (x * y))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if z <= -2.25e+21: tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z)))) elif z <= 2.1e+154: tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - (k * (j * 27.0)) else: tmp = z * ((-27.0 * ((j * k) / z)) + (18.0 * (t * (x * y)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= -2.25e+21) tmp = Float64(y * Float64(Float64(-27.0 * Float64(Float64(j * k) / y)) + Float64(18.0 * Float64(t * Float64(x * z))))); elseif (z <= 2.1e+154) tmp = Float64(Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(x * 4.0) * i)) - Float64(k * Float64(j * 27.0))); else tmp = Float64(z * Float64(Float64(-27.0 * Float64(Float64(j * k) / z)) + Float64(18.0 * Float64(t * Float64(x * y))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (z <= -2.25e+21)
tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z))));
elseif (z <= 2.1e+154)
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - (k * (j * 27.0));
else
tmp = z * ((-27.0 * ((j * k) / z)) + (18.0 * (t * (x * y))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, -2.25e+21], N[(y * N[(N[(-27.0 * N[(N[(j * k), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+154], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(-27.0 * N[(N[(j * k), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+21}:\\
\;\;\;\;y \cdot \left(-27 \cdot \frac{j \cdot k}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+154}:\\
\;\;\;\;\left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-27 \cdot \frac{j \cdot k}{z} + 18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if z < -2.25e21Initial program 81.3%
Simplified78.5%
Taylor expanded in y around inf 60.2%
associate-*r*61.7%
Simplified61.7%
Taylor expanded in y around inf 58.6%
if -2.25e21 < z < 2.09999999999999994e154Initial program 86.7%
Taylor expanded in x around 0 85.5%
if 2.09999999999999994e154 < z Initial program 71.0%
Simplified80.7%
Taylor expanded in y around inf 74.5%
associate-*r*74.4%
Simplified74.4%
Taylor expanded in z around inf 80.8%
Final simplification78.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)))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -5.4e+114)
t_2
(if (<= t -7000000.0)
(- (+ (* b c) (* -4.0 (* t a))) t_1)
(if (<= t 1.9e+108) (- (* b c) (+ (* 4.0 (* x i)) 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 = 27.0 * (j * k);
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -5.4e+114) {
tmp = t_2;
} else if (t <= -7000000.0) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else if (t <= 1.9e+108) {
tmp = (b * c) - ((4.0 * (x * i)) + 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 = 27.0d0 * (j * k)
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-5.4d+114)) then
tmp = t_2
else if (t <= (-7000000.0d0)) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
else if (t <= 1.9d+108) then
tmp = (b * c) - ((4.0d0 * (x * i)) + 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 = 27.0 * (j * k);
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -5.4e+114) {
tmp = t_2;
} else if (t <= -7000000.0) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else if (t <= 1.9e+108) {
tmp = (b * c) - ((4.0 * (x * i)) + 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 = 27.0 * (j * k) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -5.4e+114: tmp = t_2 elif t <= -7000000.0: tmp = ((b * c) + (-4.0 * (t * a))) - t_1 elif t <= 1.9e+108: tmp = (b * c) - ((4.0 * (x * i)) + 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(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 <= -5.4e+114) tmp = t_2; elseif (t <= -7000000.0) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1); elseif (t <= 1.9e+108) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + 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 = 27.0 * (j * k);
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -5.4e+114)
tmp = t_2;
elseif (t <= -7000000.0)
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
elseif (t <= 1.9e+108)
tmp = (b * c) - ((4.0 * (x * i)) + 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[(27.0 * N[(j * k), $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, -5.4e+114], t$95$2, If[LessEqual[t, -7000000.0], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 1.9e+108], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + t$95$1), $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 := 27 \cdot \left(j \cdot k\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 -5.4 \cdot 10^{+114}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -7000000:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+108}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.4000000000000001e114 or 1.90000000000000004e108 < t Initial program 74.2%
Simplified80.8%
Taylor expanded in t around inf 81.8%
if -5.4000000000000001e114 < t < -7e6Initial program 91.2%
Simplified91.2%
Taylor expanded in x around 0 69.7%
if -7e6 < t < 1.90000000000000004e108Initial program 86.6%
Simplified89.7%
Taylor expanded in t around 0 78.2%
Final simplification78.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 -3.55e+114)
t_1
(if (<= t 2.4e-105)
(- (* b c) (* k (* j 27.0)))
(if (<= t 1.8e+180)
(* b (+ c (* -27.0 (* j (/ k b)))))
(if (<= t 3.35e+212) (+ (* b c) (* -4.0 (* t a))) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -3.55e+114) {
tmp = t_1;
} else if (t <= 2.4e-105) {
tmp = (b * c) - (k * (j * 27.0));
} else if (t <= 1.8e+180) {
tmp = b * (c + (-27.0 * (j * (k / b))));
} else if (t <= 3.35e+212) {
tmp = (b * c) + (-4.0 * (t * a));
} 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 <= (-3.55d+114)) then
tmp = t_1
else if (t <= 2.4d-105) then
tmp = (b * c) - (k * (j * 27.0d0))
else if (t <= 1.8d+180) then
tmp = b * (c + ((-27.0d0) * (j * (k / b))))
else if (t <= 3.35d+212) then
tmp = (b * c) + ((-4.0d0) * (t * a))
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 <= -3.55e+114) {
tmp = t_1;
} else if (t <= 2.4e-105) {
tmp = (b * c) - (k * (j * 27.0));
} else if (t <= 1.8e+180) {
tmp = b * (c + (-27.0 * (j * (k / b))));
} else if (t <= 3.35e+212) {
tmp = (b * c) + (-4.0 * (t * a));
} 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 <= -3.55e+114: tmp = t_1 elif t <= 2.4e-105: tmp = (b * c) - (k * (j * 27.0)) elif t <= 1.8e+180: tmp = b * (c + (-27.0 * (j * (k / b)))) elif t <= 3.35e+212: tmp = (b * c) + (-4.0 * (t * a)) 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 <= -3.55e+114) tmp = t_1; elseif (t <= 2.4e-105) tmp = Float64(Float64(b * c) - Float64(k * Float64(j * 27.0))); elseif (t <= 1.8e+180) tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(j * Float64(k / b))))); elseif (t <= 3.35e+212) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); 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 <= -3.55e+114)
tmp = t_1;
elseif (t <= 2.4e-105)
tmp = (b * c) - (k * (j * 27.0));
elseif (t <= 1.8e+180)
tmp = b * (c + (-27.0 * (j * (k / b))));
elseif (t <= 3.35e+212)
tmp = (b * c) + (-4.0 * (t * a));
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, -3.55e+114], t$95$1, If[LessEqual[t, 2.4e-105], N[(N[(b * c), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+180], N[(b * N[(c + N[(-27.0 * N[(j * N[(k / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.35e+212], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $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 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -3.55 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-105}:\\
\;\;\;\;b \cdot c - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+180}:\\
\;\;\;\;b \cdot \left(c + -27 \cdot \left(j \cdot \frac{k}{b}\right)\right)\\
\mathbf{elif}\;t \leq 3.35 \cdot 10^{+212}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.5500000000000001e114 or 3.3499999999999999e212 < t Initial program 73.0%
Simplified76.9%
Taylor expanded in x around inf 75.6%
Taylor expanded in t around inf 75.3%
if -3.5500000000000001e114 < t < 2.40000000000000015e-105Initial program 87.7%
Simplified91.8%
Taylor expanded in t around 0 77.9%
Taylor expanded in i around 0 60.4%
associate-*r*60.4%
*-commutative60.4%
*-commutative60.4%
*-commutative60.4%
Simplified60.4%
if 2.40000000000000015e-105 < t < 1.8000000000000001e180Initial program 83.5%
Simplified85.3%
Taylor expanded in t around 0 63.9%
Taylor expanded in i around 0 51.2%
associate-*r*51.2%
*-commutative51.2%
*-commutative51.2%
*-commutative51.2%
Simplified51.2%
Taylor expanded in b around inf 51.3%
*-commutative51.3%
associate-/l*55.0%
Simplified55.0%
if 1.8000000000000001e180 < t < 3.3499999999999999e212Initial program 76.5%
Simplified87.3%
Taylor expanded in x around 0 88.3%
Taylor expanded in j around 0 88.3%
Final simplification63.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) (* -4.0 (* t a)))) (t_2 (* 18.0 (* t (* x (* y z))))))
(if (<= z -6.2e-102)
t_2
(if (<= z 6e-70)
t_1
(if (<= z 3.65e-10) (* k (* j -27.0)) (if (<= z 1.8e+154) 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 * (t * a));
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (z <= -6.2e-102) {
tmp = t_2;
} else if (z <= 6e-70) {
tmp = t_1;
} else if (z <= 3.65e-10) {
tmp = k * (j * -27.0);
} else if (z <= 1.8e+154) {
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) * (t * a))
t_2 = 18.0d0 * (t * (x * (y * z)))
if (z <= (-6.2d-102)) then
tmp = t_2
else if (z <= 6d-70) then
tmp = t_1
else if (z <= 3.65d-10) then
tmp = k * (j * (-27.0d0))
else if (z <= 1.8d+154) 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 * (t * a));
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (z <= -6.2e-102) {
tmp = t_2;
} else if (z <= 6e-70) {
tmp = t_1;
} else if (z <= 3.65e-10) {
tmp = k * (j * -27.0);
} else if (z <= 1.8e+154) {
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 * (t * a)) t_2 = 18.0 * (t * (x * (y * z))) tmp = 0 if z <= -6.2e-102: tmp = t_2 elif z <= 6e-70: tmp = t_1 elif z <= 3.65e-10: tmp = k * (j * -27.0) elif z <= 1.8e+154: 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(-4.0 * Float64(t * a))) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (z <= -6.2e-102) tmp = t_2; elseif (z <= 6e-70) tmp = t_1; elseif (z <= 3.65e-10) tmp = Float64(k * Float64(j * -27.0)); elseif (z <= 1.8e+154) 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 * (t * a));
t_2 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (z <= -6.2e-102)
tmp = t_2;
elseif (z <= 6e-70)
tmp = t_1;
elseif (z <= 3.65e-10)
tmp = k * (j * -27.0);
elseif (z <= 1.8e+154)
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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e-102], t$95$2, If[LessEqual[z, 6e-70], t$95$1, If[LessEqual[z, 3.65e-10], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+154], 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 + -4 \cdot \left(t \cdot a\right)\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{-102}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.65 \cdot 10^{-10}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+154}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.20000000000000026e-102 or 1.8e154 < z Initial program 78.9%
Simplified81.3%
Taylor expanded in x around inf 52.7%
Taylor expanded in t around inf 44.2%
if -6.20000000000000026e-102 < z < 6.0000000000000003e-70 or 3.6499999999999998e-10 < z < 1.8e154Initial program 88.9%
Simplified94.2%
Taylor expanded in x around 0 68.6%
Taylor expanded in j around 0 45.9%
if 6.0000000000000003e-70 < z < 3.6499999999999998e-10Initial program 71.2%
Simplified71.4%
associate-*r*71.4%
distribute-rgt-out--71.4%
sub-neg71.4%
associate-*l*71.4%
*-commutative71.4%
*-commutative71.4%
Applied egg-rr71.4%
sub-neg71.4%
associate-*l*71.4%
associate-*r*71.4%
*-commutative71.4%
*-commutative71.4%
fma-neg71.4%
*-commutative71.4%
distribute-lft-neg-in71.4%
metadata-eval71.4%
*-commutative71.4%
Simplified71.4%
fma-undefine71.4%
Applied egg-rr71.4%
Taylor expanded in j around inf 71.7%
*-commutative71.7%
*-commutative71.7%
associate-*r*71.7%
Simplified71.7%
Final simplification45.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 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -2.05e-5)
t_1
(if (<= t -4e-233)
(+ (* j (* k -27.0)) (* -4.0 (* x i)))
(if (<= t 1.05e+39) (* b (+ c (* -27.0 (* j (/ k b))))) 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 <= -2.05e-5) {
tmp = t_1;
} else if (t <= -4e-233) {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
} else if (t <= 1.05e+39) {
tmp = b * (c + (-27.0 * (j * (k / b))));
} 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 <= (-2.05d-5)) then
tmp = t_1
else if (t <= (-4d-233)) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (x * i))
else if (t <= 1.05d+39) then
tmp = b * (c + ((-27.0d0) * (j * (k / b))))
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 <= -2.05e-5) {
tmp = t_1;
} else if (t <= -4e-233) {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
} else if (t <= 1.05e+39) {
tmp = b * (c + (-27.0 * (j * (k / b))));
} 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 <= -2.05e-5: tmp = t_1 elif t <= -4e-233: tmp = (j * (k * -27.0)) + (-4.0 * (x * i)) elif t <= 1.05e+39: tmp = b * (c + (-27.0 * (j * (k / b)))) 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 <= -2.05e-5) tmp = t_1; elseif (t <= -4e-233) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(x * i))); elseif (t <= 1.05e+39) tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(j * Float64(k / b))))); 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 <= -2.05e-5)
tmp = t_1;
elseif (t <= -4e-233)
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
elseif (t <= 1.05e+39)
tmp = b * (c + (-27.0 * (j * (k / b))));
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, -2.05e-5], t$95$1, If[LessEqual[t, -4e-233], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+39], N[(b * N[(c + N[(-27.0 * N[(j * N[(k / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\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 -2.05 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-233}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+39}:\\
\;\;\;\;b \cdot \left(c + -27 \cdot \left(j \cdot \frac{k}{b}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.05000000000000002e-5 or 1.0499999999999999e39 < t Initial program 79.1%
Simplified83.6%
Taylor expanded in t around inf 71.6%
if -2.05000000000000002e-5 < t < -3.99999999999999983e-233Initial program 82.7%
Simplified94.9%
Taylor expanded in i around inf 59.4%
if -3.99999999999999983e-233 < t < 1.0499999999999999e39Initial program 88.7%
Simplified86.8%
Taylor expanded in t around 0 80.6%
Taylor expanded in i around 0 66.0%
associate-*r*66.1%
*-commutative66.1%
*-commutative66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in b around inf 62.5%
*-commutative62.5%
associate-/l*64.5%
Simplified64.5%
Final simplification66.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -2800000.0) (not (<= t 1.12e+108))) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))) (- (* b c) (+ (* 4.0 (* x i)) (* 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 ((t <= -2800000.0) || !(t <= 1.12e+108)) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = (b * c) - ((4.0 * (x * i)) + (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 ((t <= (-2800000.0d0)) .or. (.not. (t <= 1.12d+108))) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else
tmp = (b * c) - ((4.0d0 * (x * i)) + (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 ((t <= -2800000.0) || !(t <= 1.12e+108)) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = (b * c) - ((4.0 * (x * i)) + (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 (t <= -2800000.0) or not (t <= 1.12e+108): tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) else: tmp = (b * c) - ((4.0 * (x * i)) + (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 ((t <= -2800000.0) || !(t <= 1.12e+108)) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); else tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + 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 ((t <= -2800000.0) || ~((t <= 1.12e+108)))
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
else
tmp = (b * c) - ((4.0 * (x * i)) + (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[t, -2800000.0], N[Not[LessEqual[t, 1.12e+108]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * 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}\;t \leq -2800000 \lor \neg \left(t \leq 1.12 \cdot 10^{+108}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\end{array}
if t < -2.8e6 or 1.11999999999999994e108 < t Initial program 78.4%
Simplified83.3%
Taylor expanded in t around inf 74.0%
if -2.8e6 < t < 1.11999999999999994e108Initial program 86.5%
Simplified89.6%
Taylor expanded in t around 0 78.6%
Final simplification76.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 (* 18.0 (* t (* x (* y z))))))
(if (<= t -2.35e+114)
t_1
(if (<= t 7e-40)
(- (* b c) (* k (* j 27.0)))
(if (<= t 1.6e+213) (+ (* b c) (* -4.0 (* t a))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= -2.35e+114) {
tmp = t_1;
} else if (t <= 7e-40) {
tmp = (b * c) - (k * (j * 27.0));
} else if (t <= 1.6e+213) {
tmp = (b * c) + (-4.0 * (t * a));
} 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 <= (-2.35d+114)) then
tmp = t_1
else if (t <= 7d-40) then
tmp = (b * c) - (k * (j * 27.0d0))
else if (t <= 1.6d+213) then
tmp = (b * c) + ((-4.0d0) * (t * a))
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 <= -2.35e+114) {
tmp = t_1;
} else if (t <= 7e-40) {
tmp = (b * c) - (k * (j * 27.0));
} else if (t <= 1.6e+213) {
tmp = (b * c) + (-4.0 * (t * a));
} 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 <= -2.35e+114: tmp = t_1 elif t <= 7e-40: tmp = (b * c) - (k * (j * 27.0)) elif t <= 1.6e+213: tmp = (b * c) + (-4.0 * (t * a)) 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 <= -2.35e+114) tmp = t_1; elseif (t <= 7e-40) tmp = Float64(Float64(b * c) - Float64(k * Float64(j * 27.0))); elseif (t <= 1.6e+213) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); 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 <= -2.35e+114)
tmp = t_1;
elseif (t <= 7e-40)
tmp = (b * c) - (k * (j * 27.0));
elseif (t <= 1.6e+213)
tmp = (b * c) + (-4.0 * (t * a));
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, -2.35e+114], t$95$1, If[LessEqual[t, 7e-40], N[(N[(b * c), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e+213], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $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 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -2.35 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-40}:\\
\;\;\;\;b \cdot c - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+213}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.35e114 or 1.5999999999999999e213 < t Initial program 73.0%
Simplified76.9%
Taylor expanded in x around inf 75.6%
Taylor expanded in t around inf 75.3%
if -2.35e114 < t < 7.0000000000000003e-40Initial program 88.5%
Simplified92.1%
Taylor expanded in t around 0 77.9%
Taylor expanded in i around 0 59.3%
associate-*r*59.4%
*-commutative59.4%
*-commutative59.4%
*-commutative59.4%
Simplified59.4%
if 7.0000000000000003e-40 < t < 1.5999999999999999e213Initial program 77.7%
Simplified82.0%
Taylor expanded in x around 0 64.8%
Taylor expanded in j around 0 58.2%
Final simplification62.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(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.3e+112)
t_1
(if (<= t 1.8e-40)
(+ (* b c) (* j (* k -27.0)))
(if (<= t 1.25e+213) (+ (* b c) (* -4.0 (* t a))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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.3e+112) {
tmp = t_1;
} else if (t <= 1.8e-40) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 1.25e+213) {
tmp = (b * c) + (-4.0 * (t * a));
} 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.3d+112)) then
tmp = t_1
else if (t <= 1.8d-40) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (t <= 1.25d+213) then
tmp = (b * c) + ((-4.0d0) * (t * a))
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.3e+112) {
tmp = t_1;
} else if (t <= 1.8e-40) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 1.25e+213) {
tmp = (b * c) + (-4.0 * (t * a));
} 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.3e+112: tmp = t_1 elif t <= 1.8e-40: tmp = (b * c) + (j * (k * -27.0)) elif t <= 1.25e+213: tmp = (b * c) + (-4.0 * (t * a)) 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.3e+112) tmp = t_1; elseif (t <= 1.8e-40) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (t <= 1.25e+213) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); 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.3e+112)
tmp = t_1;
elseif (t <= 1.8e-40)
tmp = (b * c) + (j * (k * -27.0));
elseif (t <= 1.25e+213)
tmp = (b * c) + (-4.0 * (t * a));
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.3e+112], t$95$1, If[LessEqual[t, 1.8e-40], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+213], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $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 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -4.3 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-40}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+213}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.29999999999999983e112 or 1.2499999999999999e213 < t Initial program 73.0%
Simplified76.9%
Taylor expanded in x around inf 75.6%
Taylor expanded in t around inf 75.3%
if -4.29999999999999983e112 < t < 1.8e-40Initial program 88.5%
Simplified92.7%
Taylor expanded in b around inf 59.4%
if 1.8e-40 < t < 1.2499999999999999e213Initial program 77.7%
Simplified82.0%
Taylor expanded in x around 0 64.8%
Taylor expanded in j around 0 58.2%
Final simplification62.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* t (* x (* y z))))))
(if (<= z -1.46e-124)
t_1
(if (<= z 8.5e-141) (* b c) (if (<= z 2.8e+67) (* k (* j -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 = 18.0 * (t * (x * (y * z)));
double tmp;
if (z <= -1.46e-124) {
tmp = t_1;
} else if (z <= 8.5e-141) {
tmp = b * c;
} else if (z <= 2.8e+67) {
tmp = k * (j * -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 = 18.0d0 * (t * (x * (y * z)))
if (z <= (-1.46d-124)) then
tmp = t_1
else if (z <= 8.5d-141) then
tmp = b * c
else if (z <= 2.8d+67) then
tmp = k * (j * (-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 = 18.0 * (t * (x * (y * z)));
double tmp;
if (z <= -1.46e-124) {
tmp = t_1;
} else if (z <= 8.5e-141) {
tmp = b * c;
} else if (z <= 2.8e+67) {
tmp = k * (j * -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 = 18.0 * (t * (x * (y * z))) tmp = 0 if z <= -1.46e-124: tmp = t_1 elif z <= 8.5e-141: tmp = b * c elif z <= 2.8e+67: tmp = k * (j * -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(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (z <= -1.46e-124) tmp = t_1; elseif (z <= 8.5e-141) tmp = Float64(b * c); elseif (z <= 2.8e+67) tmp = Float64(k * Float64(j * -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 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (z <= -1.46e-124)
tmp = t_1;
elseif (z <= 8.5e-141)
tmp = b * c;
elseif (z <= 2.8e+67)
tmp = k * (j * -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[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.46e-124], t$95$1, If[LessEqual[z, 8.5e-141], N[(b * c), $MachinePrecision], If[LessEqual[z, 2.8e+67], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;z \leq -1.46 \cdot 10^{-124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-141}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+67}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.4599999999999999e-124 or 2.7999999999999998e67 < z Initial program 80.1%
Simplified82.2%
Taylor expanded in x around inf 54.5%
Taylor expanded in t around inf 45.1%
if -1.4599999999999999e-124 < z < 8.50000000000000021e-141Initial program 86.4%
Simplified93.6%
associate-*r*86.4%
distribute-rgt-out--86.4%
sub-neg86.4%
associate-*l*86.3%
*-commutative86.3%
*-commutative86.3%
Applied egg-rr86.3%
sub-neg86.3%
associate-*l*93.6%
associate-*r*93.6%
*-commutative93.6%
*-commutative93.6%
fma-neg93.6%
*-commutative93.6%
distribute-lft-neg-in93.6%
metadata-eval93.6%
*-commutative93.6%
Simplified93.6%
Taylor expanded in b around inf 36.6%
if 8.50000000000000021e-141 < z < 2.7999999999999998e67Initial program 91.2%
Simplified93.9%
associate-*r*91.2%
distribute-rgt-out--91.2%
sub-neg91.2%
associate-*l*91.2%
*-commutative91.2%
*-commutative91.2%
Applied egg-rr91.2%
sub-neg91.2%
associate-*l*93.9%
associate-*r*93.9%
*-commutative93.9%
*-commutative93.9%
fma-neg93.9%
*-commutative93.9%
distribute-lft-neg-in93.9%
metadata-eval93.9%
*-commutative93.9%
Simplified93.9%
fma-undefine93.9%
Applied egg-rr93.9%
Taylor expanded in j around inf 34.5%
*-commutative34.5%
*-commutative34.5%
associate-*r*34.5%
Simplified34.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 (if (or (<= k -2.4e-79) (not (<= k 8.5e+132))) (* -27.0 (* j k)) (* b c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -2.4e-79) || !(k <= 8.5e+132)) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((k <= (-2.4d-79)) .or. (.not. (k <= 8.5d+132))) then
tmp = (-27.0d0) * (j * k)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -2.4e-79) || !(k <= 8.5e+132)) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (k <= -2.4e-79) or not (k <= 8.5e+132): tmp = -27.0 * (j * k) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((k <= -2.4e-79) || !(k <= 8.5e+132)) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((k <= -2.4e-79) || ~((k <= 8.5e+132)))
tmp = -27.0 * (j * k);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[k, -2.4e-79], N[Not[LessEqual[k, 8.5e+132]], $MachinePrecision]], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -2.4 \cdot 10^{-79} \lor \neg \left(k \leq 8.5 \cdot 10^{+132}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if k < -2.40000000000000006e-79 or 8.49999999999999969e132 < k Initial program 82.3%
Simplified87.3%
Taylor expanded in j around inf 46.7%
if -2.40000000000000006e-79 < k < 8.49999999999999969e132Initial program 84.5%
Simplified87.2%
associate-*r*85.2%
distribute-rgt-out--84.5%
sub-neg84.5%
associate-*l*83.3%
*-commutative83.3%
*-commutative83.3%
Applied egg-rr83.3%
sub-neg83.3%
associate-*l*88.0%
associate-*r*88.0%
*-commutative88.0%
*-commutative88.0%
fma-neg88.0%
*-commutative88.0%
distribute-lft-neg-in88.0%
metadata-eval88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in b around inf 38.9%
Final simplification42.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 (<= k -3.6e-90) (* j (* k -27.0)) (if (<= k 1.7e+133) (* b c) (* k (* j -27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -3.6e-90) {
tmp = j * (k * -27.0);
} else if (k <= 1.7e+133) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-3.6d-90)) then
tmp = j * (k * (-27.0d0))
else if (k <= 1.7d+133) then
tmp = b * c
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -3.6e-90) {
tmp = j * (k * -27.0);
} else if (k <= 1.7e+133) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -3.6e-90: tmp = j * (k * -27.0) elif k <= 1.7e+133: tmp = b * c else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -3.6e-90) tmp = Float64(j * Float64(k * -27.0)); elseif (k <= 1.7e+133) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -3.6e-90)
tmp = j * (k * -27.0);
elseif (k <= 1.7e+133)
tmp = b * c;
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -3.6e-90], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.7e+133], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -3.6 \cdot 10^{-90}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;k \leq 1.7 \cdot 10^{+133}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if k < -3.59999999999999981e-90Initial program 79.0%
Simplified88.1%
Taylor expanded in j around inf 44.6%
*-commutative44.6%
associate-*r*44.7%
*-commutative44.7%
Simplified44.7%
if -3.59999999999999981e-90 < k < 1.69999999999999994e133Initial program 84.4%
Simplified87.2%
associate-*r*85.1%
distribute-rgt-out--84.4%
sub-neg84.4%
associate-*l*83.2%
*-commutative83.2%
*-commutative83.2%
Applied egg-rr83.2%
sub-neg83.2%
associate-*l*87.9%
associate-*r*87.9%
*-commutative87.9%
*-commutative87.9%
fma-neg87.9%
*-commutative87.9%
distribute-lft-neg-in87.9%
metadata-eval87.9%
*-commutative87.9%
Simplified87.9%
Taylor expanded in b around inf 38.4%
if 1.69999999999999994e133 < k Initial program 88.2%
Simplified86.2%
associate-*r*88.2%
distribute-rgt-out--88.2%
sub-neg88.2%
associate-*l*85.9%
*-commutative85.9%
*-commutative85.9%
Applied egg-rr85.9%
sub-neg85.9%
associate-*l*85.9%
associate-*r*85.9%
*-commutative85.9%
*-commutative85.9%
fma-neg85.9%
*-commutative85.9%
distribute-lft-neg-in85.9%
metadata-eval85.9%
*-commutative85.9%
Simplified85.9%
fma-undefine85.9%
Applied egg-rr85.9%
Taylor expanded in j around inf 49.2%
*-commutative49.2%
*-commutative49.2%
associate-*r*49.2%
Simplified49.2%
Final simplification42.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 (<= k -5.2e-87) (* j (* k -27.0)) (if (<= k 1.1e+133) (* 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 (k <= -5.2e-87) {
tmp = j * (k * -27.0);
} else if (k <= 1.1e+133) {
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 (k <= (-5.2d-87)) then
tmp = j * (k * (-27.0d0))
else if (k <= 1.1d+133) 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 (k <= -5.2e-87) {
tmp = j * (k * -27.0);
} else if (k <= 1.1e+133) {
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 k <= -5.2e-87: tmp = j * (k * -27.0) elif k <= 1.1e+133: 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 (k <= -5.2e-87) tmp = Float64(j * Float64(k * -27.0)); elseif (k <= 1.1e+133) 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 (k <= -5.2e-87)
tmp = j * (k * -27.0);
elseif (k <= 1.1e+133)
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[LessEqual[k, -5.2e-87], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.1e+133], 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}\;k \leq -5.2 \cdot 10^{-87}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;k \leq 1.1 \cdot 10^{+133}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if k < -5.20000000000000005e-87Initial program 78.8%
Simplified87.9%
Taylor expanded in j around inf 45.2%
*-commutative45.2%
associate-*r*45.2%
*-commutative45.2%
Simplified45.2%
if -5.20000000000000005e-87 < k < 1.1e133Initial program 84.5%
Simplified87.2%
associate-*r*85.2%
distribute-rgt-out--84.5%
sub-neg84.5%
associate-*l*83.3%
*-commutative83.3%
*-commutative83.3%
Applied egg-rr83.3%
sub-neg83.3%
associate-*l*88.0%
associate-*r*88.0%
*-commutative88.0%
*-commutative88.0%
fma-neg88.0%
*-commutative88.0%
distribute-lft-neg-in88.0%
metadata-eval88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in b around inf 38.9%
if 1.1e133 < k Initial program 88.2%
Simplified86.2%
Taylor expanded in j around inf 49.2%
Final simplification42.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
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 83.5%
Simplified87.3%
associate-*r*84.7%
distribute-rgt-out--83.5%
sub-neg83.5%
associate-*l*81.9%
*-commutative81.9%
*-commutative81.9%
Applied egg-rr81.9%
sub-neg81.9%
associate-*l*86.0%
associate-*r*86.0%
*-commutative86.0%
*-commutative86.0%
fma-neg86.0%
*-commutative86.0%
distribute-lft-neg-in86.0%
metadata-eval86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in b around inf 26.2%
(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 2024112
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))