
(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 23 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 (<= (* k (* j 27.0)) 1e+218)
(-
(+ (* t (- (* (* y z) (* x 18.0)) (* a 4.0))) (* b c))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(fma -27.0 (* j k) (fma -4.0 (* x i) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k * (j * 27.0)) <= 1e+218) {
tmp = ((t * (((y * z) * (x * 18.0)) - (a * 4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = fma(-27.0, (j * k), fma(-4.0, (x * i), (b * c)));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(k * Float64(j * 27.0)) <= 1e+218) tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = fma(-27.0, Float64(j * k), fma(-4.0, Float64(x * i), Float64(b * c))); 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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision], 1e+218], N[(N[(N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision] + N[(b * c), $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}\;k \cdot \left(j \cdot 27\right) \leq 10^{+218}:\\
\;\;\;\;\left(t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(-4, x \cdot i, b \cdot c\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < 1.00000000000000008e218Initial program 88.2%
Simplified91.8%
if 1.00000000000000008e218 < (*.f64 (*.f64 j 27) k) Initial program 80.8%
Simplified81.0%
Taylor expanded in t around 0 92.2%
fma-def96.1%
fma-def96.1%
*-commutative96.1%
Simplified96.1%
Final simplification92.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 (+ (fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* -4.0 i)))) (* j (* k -27.0))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + (j * (k * -27.0));
}
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(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(k * -27.0))) end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\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])\\
\\
\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + j \cdot \left(k \cdot -27\right)
\end{array}
Initial program 87.5%
Simplified91.5%
Final simplification91.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
(-
(-
(+ (* b c) (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))))
(* i (* x 4.0)))
(* k (* j 27.0)))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* t (* y z))) (* i 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0)))) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 97.4%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified38.5%
Taylor expanded in x around inf 50.2%
Final simplification92.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 (* -27.0 (* j k))) (t_2 (* x (* -4.0 i))))
(if (<= (* b c) -1.9e+149)
(* b c)
(if (<= (* b c) -1.28e+70)
t_1
(if (<= (* b c) -1.5e+62)
(* b c)
(if (<= (* b c) -3.6e-118)
(* t (* a -4.0))
(if (<= (* b c) -2e-273)
t_1
(if (<= (* b c) 5e-324)
t_2
(if (<= (* b c) 1.05e-135)
t_1
(if (<= (* b c) 620000000000.0)
t_2
(if (<= (* b c) 8e+91)
(* 18.0 (* t (* x (* y z))))
(* b c))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = x * (-4.0 * i);
double tmp;
if ((b * c) <= -1.9e+149) {
tmp = b * c;
} else if ((b * c) <= -1.28e+70) {
tmp = t_1;
} else if ((b * c) <= -1.5e+62) {
tmp = b * c;
} else if ((b * c) <= -3.6e-118) {
tmp = t * (a * -4.0);
} else if ((b * c) <= -2e-273) {
tmp = t_1;
} else if ((b * c) <= 5e-324) {
tmp = t_2;
} else if ((b * c) <= 1.05e-135) {
tmp = t_1;
} else if ((b * c) <= 620000000000.0) {
tmp = t_2;
} else if ((b * c) <= 8e+91) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
t_2 = x * ((-4.0d0) * i)
if ((b * c) <= (-1.9d+149)) then
tmp = b * c
else if ((b * c) <= (-1.28d+70)) then
tmp = t_1
else if ((b * c) <= (-1.5d+62)) then
tmp = b * c
else if ((b * c) <= (-3.6d-118)) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= (-2d-273)) then
tmp = t_1
else if ((b * c) <= 5d-324) then
tmp = t_2
else if ((b * c) <= 1.05d-135) then
tmp = t_1
else if ((b * c) <= 620000000000.0d0) then
tmp = t_2
else if ((b * c) <= 8d+91) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = x * (-4.0 * i);
double tmp;
if ((b * c) <= -1.9e+149) {
tmp = b * c;
} else if ((b * c) <= -1.28e+70) {
tmp = t_1;
} else if ((b * c) <= -1.5e+62) {
tmp = b * c;
} else if ((b * c) <= -3.6e-118) {
tmp = t * (a * -4.0);
} else if ((b * c) <= -2e-273) {
tmp = t_1;
} else if ((b * c) <= 5e-324) {
tmp = t_2;
} else if ((b * c) <= 1.05e-135) {
tmp = t_1;
} else if ((b * c) <= 620000000000.0) {
tmp = t_2;
} else if ((b * c) <= 8e+91) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) t_2 = x * (-4.0 * i) tmp = 0 if (b * c) <= -1.9e+149: tmp = b * c elif (b * c) <= -1.28e+70: tmp = t_1 elif (b * c) <= -1.5e+62: tmp = b * c elif (b * c) <= -3.6e-118: tmp = t * (a * -4.0) elif (b * c) <= -2e-273: tmp = t_1 elif (b * c) <= 5e-324: tmp = t_2 elif (b * c) <= 1.05e-135: tmp = t_1 elif (b * c) <= 620000000000.0: tmp = t_2 elif (b * c) <= 8e+91: tmp = 18.0 * (t * (x * (y * z))) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) t_2 = Float64(x * Float64(-4.0 * i)) tmp = 0.0 if (Float64(b * c) <= -1.9e+149) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.28e+70) tmp = t_1; elseif (Float64(b * c) <= -1.5e+62) tmp = Float64(b * c); elseif (Float64(b * c) <= -3.6e-118) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= -2e-273) tmp = t_1; elseif (Float64(b * c) <= 5e-324) tmp = t_2; elseif (Float64(b * c) <= 1.05e-135) tmp = t_1; elseif (Float64(b * c) <= 620000000000.0) tmp = t_2; elseif (Float64(b * c) <= 8e+91) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -27.0 * (j * k);
t_2 = x * (-4.0 * i);
tmp = 0.0;
if ((b * c) <= -1.9e+149)
tmp = b * c;
elseif ((b * c) <= -1.28e+70)
tmp = t_1;
elseif ((b * c) <= -1.5e+62)
tmp = b * c;
elseif ((b * c) <= -3.6e-118)
tmp = t * (a * -4.0);
elseif ((b * c) <= -2e-273)
tmp = t_1;
elseif ((b * c) <= 5e-324)
tmp = t_2;
elseif ((b * c) <= 1.05e-135)
tmp = t_1;
elseif ((b * c) <= 620000000000.0)
tmp = t_2;
elseif ((b * c) <= 8e+91)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.9e+149], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.28e+70], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -1.5e+62], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.6e-118], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e-273], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 5e-324], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.05e-135], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 620000000000.0], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 8e+91], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := x \cdot \left(-4 \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -1.9 \cdot 10^{+149}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.28 \cdot 10^{+70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -1.5 \cdot 10^{+62}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -3.6 \cdot 10^{-118}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-273}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-324}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 1.05 \cdot 10^{-135}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 620000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{+91}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.9e149 or -1.27999999999999994e70 < (*.f64 b c) < -1.5e62 or 8.00000000000000064e91 < (*.f64 b c) Initial program 83.1%
Simplified85.6%
associate-*r*86.7%
distribute-rgt-out--83.1%
cancel-sign-sub-inv83.1%
associate-*l*80.7%
fma-def81.9%
associate-*l*81.9%
Applied egg-rr81.9%
Taylor expanded in b around inf 66.4%
if -1.9e149 < (*.f64 b c) < -1.27999999999999994e70 or -3.6000000000000002e-118 < (*.f64 b c) < -2e-273 or 4.94066e-324 < (*.f64 b c) < 1.05e-135Initial program 88.4%
Simplified91.9%
Taylor expanded in j around inf 47.1%
if -1.5e62 < (*.f64 b c) < -3.6000000000000002e-118Initial program 80.8%
Simplified92.2%
associate-*r*84.6%
distribute-rgt-out--80.7%
cancel-sign-sub-inv80.7%
associate-*l*76.9%
fma-def80.7%
associate-*l*80.7%
Applied egg-rr80.7%
fma-udef76.9%
*-commutative76.9%
distribute-rgt-neg-in76.9%
metadata-eval76.9%
Applied egg-rr76.9%
+-commutative76.9%
*-commutative76.9%
*-commutative76.9%
associate-*r*80.7%
distribute-rgt-out84.6%
Simplified84.6%
Taylor expanded in a around inf 43.7%
associate-*r*43.7%
*-commutative43.7%
Simplified43.7%
if -2e-273 < (*.f64 b c) < 4.94066e-324 or 1.05e-135 < (*.f64 b c) < 6.2e11Initial program 93.1%
Simplified93.2%
Taylor expanded in x around inf 51.4%
Taylor expanded in t around 0 43.3%
if 6.2e11 < (*.f64 b c) < 8.00000000000000064e91Initial program 92.3%
Simplified92.8%
associate-*r*100.0%
distribute-rgt-out--92.3%
cancel-sign-sub-inv92.3%
associate-*l*85.2%
fma-def85.2%
associate-*l*85.2%
Applied egg-rr85.2%
fma-udef85.2%
*-commutative85.2%
distribute-rgt-neg-in85.2%
metadata-eval85.2%
Applied egg-rr85.2%
+-commutative85.2%
*-commutative85.2%
*-commutative85.2%
associate-*r*92.3%
distribute-rgt-out100.0%
Simplified100.0%
Taylor expanded in y around inf 63.1%
*-commutative63.1%
Simplified63.1%
Final simplification52.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))) (t_2 (* x (* -4.0 i))))
(if (<= (* b c) -1.1e+160)
(* b c)
(if (<= (* b c) -1.9e+70)
t_1
(if (<= (* b c) -1.56e+62)
(* b c)
(if (<= (* b c) -8e-119)
(* t (* a -4.0))
(if (<= (* b c) -1.35e-280)
t_1
(if (<= (* b c) 5e-324)
t_2
(if (<= (* b c) 1e-135)
t_1
(if (<= (* b c) 0.000195)
t_2
(if (<= (* b c) 5e+96)
(* (* y (* x z)) (* t 18.0))
(* b c))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = x * (-4.0 * i);
double tmp;
if ((b * c) <= -1.1e+160) {
tmp = b * c;
} else if ((b * c) <= -1.9e+70) {
tmp = t_1;
} else if ((b * c) <= -1.56e+62) {
tmp = b * c;
} else if ((b * c) <= -8e-119) {
tmp = t * (a * -4.0);
} else if ((b * c) <= -1.35e-280) {
tmp = t_1;
} else if ((b * c) <= 5e-324) {
tmp = t_2;
} else if ((b * c) <= 1e-135) {
tmp = t_1;
} else if ((b * c) <= 0.000195) {
tmp = t_2;
} else if ((b * c) <= 5e+96) {
tmp = (y * (x * z)) * (t * 18.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
t_2 = x * ((-4.0d0) * i)
if ((b * c) <= (-1.1d+160)) then
tmp = b * c
else if ((b * c) <= (-1.9d+70)) then
tmp = t_1
else if ((b * c) <= (-1.56d+62)) then
tmp = b * c
else if ((b * c) <= (-8d-119)) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= (-1.35d-280)) then
tmp = t_1
else if ((b * c) <= 5d-324) then
tmp = t_2
else if ((b * c) <= 1d-135) then
tmp = t_1
else if ((b * c) <= 0.000195d0) then
tmp = t_2
else if ((b * c) <= 5d+96) then
tmp = (y * (x * z)) * (t * 18.0d0)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = x * (-4.0 * i);
double tmp;
if ((b * c) <= -1.1e+160) {
tmp = b * c;
} else if ((b * c) <= -1.9e+70) {
tmp = t_1;
} else if ((b * c) <= -1.56e+62) {
tmp = b * c;
} else if ((b * c) <= -8e-119) {
tmp = t * (a * -4.0);
} else if ((b * c) <= -1.35e-280) {
tmp = t_1;
} else if ((b * c) <= 5e-324) {
tmp = t_2;
} else if ((b * c) <= 1e-135) {
tmp = t_1;
} else if ((b * c) <= 0.000195) {
tmp = t_2;
} else if ((b * c) <= 5e+96) {
tmp = (y * (x * z)) * (t * 18.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) t_2 = x * (-4.0 * i) tmp = 0 if (b * c) <= -1.1e+160: tmp = b * c elif (b * c) <= -1.9e+70: tmp = t_1 elif (b * c) <= -1.56e+62: tmp = b * c elif (b * c) <= -8e-119: tmp = t * (a * -4.0) elif (b * c) <= -1.35e-280: tmp = t_1 elif (b * c) <= 5e-324: tmp = t_2 elif (b * c) <= 1e-135: tmp = t_1 elif (b * c) <= 0.000195: tmp = t_2 elif (b * c) <= 5e+96: tmp = (y * (x * z)) * (t * 18.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) t_2 = Float64(x * Float64(-4.0 * i)) tmp = 0.0 if (Float64(b * c) <= -1.1e+160) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.9e+70) tmp = t_1; elseif (Float64(b * c) <= -1.56e+62) tmp = Float64(b * c); elseif (Float64(b * c) <= -8e-119) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= -1.35e-280) tmp = t_1; elseif (Float64(b * c) <= 5e-324) tmp = t_2; elseif (Float64(b * c) <= 1e-135) tmp = t_1; elseif (Float64(b * c) <= 0.000195) tmp = t_2; elseif (Float64(b * c) <= 5e+96) tmp = Float64(Float64(y * Float64(x * z)) * Float64(t * 18.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -27.0 * (j * k);
t_2 = x * (-4.0 * i);
tmp = 0.0;
if ((b * c) <= -1.1e+160)
tmp = b * c;
elseif ((b * c) <= -1.9e+70)
tmp = t_1;
elseif ((b * c) <= -1.56e+62)
tmp = b * c;
elseif ((b * c) <= -8e-119)
tmp = t * (a * -4.0);
elseif ((b * c) <= -1.35e-280)
tmp = t_1;
elseif ((b * c) <= 5e-324)
tmp = t_2;
elseif ((b * c) <= 1e-135)
tmp = t_1;
elseif ((b * c) <= 0.000195)
tmp = t_2;
elseif ((b * c) <= 5e+96)
tmp = (y * (x * z)) * (t * 18.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.1e+160], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.9e+70], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -1.56e+62], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -8e-119], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.35e-280], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 5e-324], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1e-135], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 0.000195], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 5e+96], N[(N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision] * N[(t * 18.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := x \cdot \left(-4 \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -1.1 \cdot 10^{+160}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.9 \cdot 10^{+70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -1.56 \cdot 10^{+62}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -8 \cdot 10^{-119}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq -1.35 \cdot 10^{-280}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-324}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 10^{-135}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 0.000195:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+96}:\\
\;\;\;\;\left(y \cdot \left(x \cdot z\right)\right) \cdot \left(t \cdot 18\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.09999999999999996e160 or -1.8999999999999999e70 < (*.f64 b c) < -1.55999999999999995e62 or 5.0000000000000004e96 < (*.f64 b c) Initial program 83.1%
Simplified85.6%
associate-*r*86.7%
distribute-rgt-out--83.1%
cancel-sign-sub-inv83.1%
associate-*l*80.7%
fma-def81.9%
associate-*l*81.9%
Applied egg-rr81.9%
Taylor expanded in b around inf 66.4%
if -1.09999999999999996e160 < (*.f64 b c) < -1.8999999999999999e70 or -8.0000000000000001e-119 < (*.f64 b c) < -1.34999999999999992e-280 or 4.94066e-324 < (*.f64 b c) < 1e-135Initial program 88.4%
Simplified91.9%
Taylor expanded in j around inf 47.1%
if -1.55999999999999995e62 < (*.f64 b c) < -8.0000000000000001e-119Initial program 80.8%
Simplified92.2%
associate-*r*84.6%
distribute-rgt-out--80.7%
cancel-sign-sub-inv80.7%
associate-*l*76.9%
fma-def80.7%
associate-*l*80.7%
Applied egg-rr80.7%
fma-udef76.9%
*-commutative76.9%
distribute-rgt-neg-in76.9%
metadata-eval76.9%
Applied egg-rr76.9%
+-commutative76.9%
*-commutative76.9%
*-commutative76.9%
associate-*r*80.7%
distribute-rgt-out84.6%
Simplified84.6%
Taylor expanded in a around inf 43.7%
associate-*r*43.7%
*-commutative43.7%
Simplified43.7%
if -1.34999999999999992e-280 < (*.f64 b c) < 4.94066e-324 or 1e-135 < (*.f64 b c) < 1.94999999999999996e-4Initial program 92.6%
Simplified94.0%
Taylor expanded in x around inf 52.9%
Taylor expanded in t around 0 45.4%
if 1.94999999999999996e-4 < (*.f64 b c) < 5.0000000000000004e96Initial program 94.6%
Simplified90.0%
associate-*r*99.8%
distribute-rgt-out--94.6%
cancel-sign-sub-inv94.6%
associate-*l*89.7%
fma-def89.7%
associate-*l*89.7%
Applied egg-rr89.7%
fma-udef89.7%
*-commutative89.7%
distribute-rgt-neg-in89.7%
metadata-eval89.7%
Applied egg-rr89.7%
+-commutative89.7%
*-commutative89.7%
*-commutative89.7%
associate-*r*94.7%
distribute-rgt-out99.9%
Simplified99.9%
Taylor expanded in y around inf 49.1%
*-commutative49.1%
Simplified49.1%
Taylor expanded in x around 0 49.1%
associate-*r*49.0%
*-commutative49.0%
*-commutative49.0%
*-commutative49.0%
associate-*l*53.8%
Simplified53.8%
Final simplification53.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* -4.0 (* x i)))))
(if (<= (* b c) -1.55e+62)
(+ t_1 (* b c))
(if (<= (* b c) -4.2e-307)
(+ t_1 (* t (* a -4.0)))
(if (<= (* b c) 1.9e-250)
t_2
(if (<= (* b c) 4.8e-182)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= (* b c) 265000000000.0)
t_2
(if (<= (* b c) 1.4e+93)
(+ t_1 (* 18.0 (* x (* y (* t z)))))
(- (* b c) (* 4.0 (* x i)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (-4.0 * (x * i));
double tmp;
if ((b * c) <= -1.55e+62) {
tmp = t_1 + (b * c);
} else if ((b * c) <= -4.2e-307) {
tmp = t_1 + (t * (a * -4.0));
} else if ((b * c) <= 1.9e-250) {
tmp = t_2;
} else if ((b * c) <= 4.8e-182) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if ((b * c) <= 265000000000.0) {
tmp = t_2;
} else if ((b * c) <= 1.4e+93) {
tmp = t_1 + (18.0 * (x * (y * (t * z))));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + ((-4.0d0) * (x * i))
if ((b * c) <= (-1.55d+62)) then
tmp = t_1 + (b * c)
else if ((b * c) <= (-4.2d-307)) then
tmp = t_1 + (t * (a * (-4.0d0)))
else if ((b * c) <= 1.9d-250) then
tmp = t_2
else if ((b * c) <= 4.8d-182) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if ((b * c) <= 265000000000.0d0) then
tmp = t_2
else if ((b * c) <= 1.4d+93) then
tmp = t_1 + (18.0d0 * (x * (y * (t * z))))
else
tmp = (b * c) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (-4.0 * (x * i));
double tmp;
if ((b * c) <= -1.55e+62) {
tmp = t_1 + (b * c);
} else if ((b * c) <= -4.2e-307) {
tmp = t_1 + (t * (a * -4.0));
} else if ((b * c) <= 1.9e-250) {
tmp = t_2;
} else if ((b * c) <= 4.8e-182) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if ((b * c) <= 265000000000.0) {
tmp = t_2;
} else if ((b * c) <= 1.4e+93) {
tmp = t_1 + (18.0 * (x * (y * (t * z))));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (-4.0 * (x * i)) tmp = 0 if (b * c) <= -1.55e+62: tmp = t_1 + (b * c) elif (b * c) <= -4.2e-307: tmp = t_1 + (t * (a * -4.0)) elif (b * c) <= 1.9e-250: tmp = t_2 elif (b * c) <= 4.8e-182: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif (b * c) <= 265000000000.0: tmp = t_2 elif (b * c) <= 1.4e+93: tmp = t_1 + (18.0 * (x * (y * (t * z)))) else: tmp = (b * c) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(-4.0 * Float64(x * i))) tmp = 0.0 if (Float64(b * c) <= -1.55e+62) tmp = Float64(t_1 + Float64(b * c)); elseif (Float64(b * c) <= -4.2e-307) tmp = Float64(t_1 + Float64(t * Float64(a * -4.0))); elseif (Float64(b * c) <= 1.9e-250) tmp = t_2; elseif (Float64(b * c) <= 4.8e-182) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (Float64(b * c) <= 265000000000.0) tmp = t_2; elseif (Float64(b * c) <= 1.4e+93) tmp = Float64(t_1 + Float64(18.0 * Float64(x * Float64(y * Float64(t * z))))); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (-4.0 * (x * i));
tmp = 0.0;
if ((b * c) <= -1.55e+62)
tmp = t_1 + (b * c);
elseif ((b * c) <= -4.2e-307)
tmp = t_1 + (t * (a * -4.0));
elseif ((b * c) <= 1.9e-250)
tmp = t_2;
elseif ((b * c) <= 4.8e-182)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif ((b * c) <= 265000000000.0)
tmp = t_2;
elseif ((b * c) <= 1.4e+93)
tmp = t_1 + (18.0 * (x * (y * (t * z))));
else
tmp = (b * c) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.55e+62], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -4.2e-307], N[(t$95$1 + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.9e-250], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 4.8e-182], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 265000000000.0], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.4e+93], N[(t$95$1 + N[(18.0 * N[(x * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -1.55 \cdot 10^{+62}:\\
\;\;\;\;t_1 + b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -4.2 \cdot 10^{-307}:\\
\;\;\;\;t_1 + t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.9 \cdot 10^{-250}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 4.8 \cdot 10^{-182}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;b \cdot c \leq 265000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 1.4 \cdot 10^{+93}:\\
\;\;\;\;t_1 + 18 \cdot \left(x \cdot \left(y \cdot \left(t \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.55000000000000007e62Initial program 79.5%
Simplified88.6%
Taylor expanded in b around inf 71.5%
if -1.55000000000000007e62 < (*.f64 b c) < -4.2000000000000002e-307Initial program 83.7%
Simplified91.0%
Taylor expanded in a around inf 63.2%
*-commutative63.2%
*-commutative63.2%
associate-*r*63.2%
*-commutative63.2%
Simplified63.2%
if -4.2000000000000002e-307 < (*.f64 b c) < 1.89999999999999985e-250 or 4.7999999999999997e-182 < (*.f64 b c) < 2.65e11Initial program 94.1%
Simplified94.2%
Taylor expanded in i around inf 63.3%
*-commutative63.3%
Simplified63.3%
if 1.89999999999999985e-250 < (*.f64 b c) < 4.7999999999999997e-182Initial program 77.3%
Simplified88.7%
Taylor expanded in t around inf 91.2%
if 2.65e11 < (*.f64 b c) < 1.39999999999999994e93Initial program 92.3%
Simplified92.7%
Taylor expanded in y around inf 78.1%
*-commutative78.1%
associate-*l*70.9%
associate-*l*78.1%
Simplified78.1%
if 1.39999999999999994e93 < (*.f64 b c) Initial program 88.0%
Taylor expanded in t around 0 84.6%
Taylor expanded in j around 0 77.3%
Final simplification69.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ t_1 (* -4.0 (* x i))))
(t_3 (* x (* y z))))
(if (<= (* b c) -9.4e+61)
(+ t_1 (* b c))
(if (<= (* b c) -1.95e-302)
(+ t_1 (* t (* a -4.0)))
(if (<= (* b c) 3.9e-250)
t_2
(if (<= (* b c) 1.8e-182)
(* t (- (* 18.0 t_3) (* a 4.0)))
(if (<= (* b c) 7.8e+16)
t_2
(if (<= (* b c) 1.6e+94)
(+ t_1 (* 18.0 (* t t_3)))
(- (* b c) (* 4.0 (* x i)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (-4.0 * (x * i));
double t_3 = x * (y * z);
double tmp;
if ((b * c) <= -9.4e+61) {
tmp = t_1 + (b * c);
} else if ((b * c) <= -1.95e-302) {
tmp = t_1 + (t * (a * -4.0));
} else if ((b * c) <= 3.9e-250) {
tmp = t_2;
} else if ((b * c) <= 1.8e-182) {
tmp = t * ((18.0 * t_3) - (a * 4.0));
} else if ((b * c) <= 7.8e+16) {
tmp = t_2;
} else if ((b * c) <= 1.6e+94) {
tmp = t_1 + (18.0 * (t * t_3));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + ((-4.0d0) * (x * i))
t_3 = x * (y * z)
if ((b * c) <= (-9.4d+61)) then
tmp = t_1 + (b * c)
else if ((b * c) <= (-1.95d-302)) then
tmp = t_1 + (t * (a * (-4.0d0)))
else if ((b * c) <= 3.9d-250) then
tmp = t_2
else if ((b * c) <= 1.8d-182) then
tmp = t * ((18.0d0 * t_3) - (a * 4.0d0))
else if ((b * c) <= 7.8d+16) then
tmp = t_2
else if ((b * c) <= 1.6d+94) then
tmp = t_1 + (18.0d0 * (t * t_3))
else
tmp = (b * c) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (-4.0 * (x * i));
double t_3 = x * (y * z);
double tmp;
if ((b * c) <= -9.4e+61) {
tmp = t_1 + (b * c);
} else if ((b * c) <= -1.95e-302) {
tmp = t_1 + (t * (a * -4.0));
} else if ((b * c) <= 3.9e-250) {
tmp = t_2;
} else if ((b * c) <= 1.8e-182) {
tmp = t * ((18.0 * t_3) - (a * 4.0));
} else if ((b * c) <= 7.8e+16) {
tmp = t_2;
} else if ((b * c) <= 1.6e+94) {
tmp = t_1 + (18.0 * (t * t_3));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (-4.0 * (x * i)) t_3 = x * (y * z) tmp = 0 if (b * c) <= -9.4e+61: tmp = t_1 + (b * c) elif (b * c) <= -1.95e-302: tmp = t_1 + (t * (a * -4.0)) elif (b * c) <= 3.9e-250: tmp = t_2 elif (b * c) <= 1.8e-182: tmp = t * ((18.0 * t_3) - (a * 4.0)) elif (b * c) <= 7.8e+16: tmp = t_2 elif (b * c) <= 1.6e+94: tmp = t_1 + (18.0 * (t * t_3)) else: tmp = (b * c) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(-4.0 * Float64(x * i))) t_3 = Float64(x * Float64(y * z)) tmp = 0.0 if (Float64(b * c) <= -9.4e+61) tmp = Float64(t_1 + Float64(b * c)); elseif (Float64(b * c) <= -1.95e-302) tmp = Float64(t_1 + Float64(t * Float64(a * -4.0))); elseif (Float64(b * c) <= 3.9e-250) tmp = t_2; elseif (Float64(b * c) <= 1.8e-182) tmp = Float64(t * Float64(Float64(18.0 * t_3) - Float64(a * 4.0))); elseif (Float64(b * c) <= 7.8e+16) tmp = t_2; elseif (Float64(b * c) <= 1.6e+94) tmp = Float64(t_1 + Float64(18.0 * Float64(t * t_3))); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (-4.0 * (x * i));
t_3 = x * (y * z);
tmp = 0.0;
if ((b * c) <= -9.4e+61)
tmp = t_1 + (b * c);
elseif ((b * c) <= -1.95e-302)
tmp = t_1 + (t * (a * -4.0));
elseif ((b * c) <= 3.9e-250)
tmp = t_2;
elseif ((b * c) <= 1.8e-182)
tmp = t * ((18.0 * t_3) - (a * 4.0));
elseif ((b * c) <= 7.8e+16)
tmp = t_2;
elseif ((b * c) <= 1.6e+94)
tmp = t_1 + (18.0 * (t * t_3));
else
tmp = (b * c) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -9.4e+61], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.95e-302], N[(t$95$1 + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.9e-250], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.8e-182], N[(t * N[(N[(18.0 * t$95$3), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 7.8e+16], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.6e+94], N[(t$95$1 + N[(18.0 * N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t_1 + -4 \cdot \left(x \cdot i\right)\\
t_3 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;b \cdot c \leq -9.4 \cdot 10^{+61}:\\
\;\;\;\;t_1 + b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.95 \cdot 10^{-302}:\\
\;\;\;\;t_1 + t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 3.9 \cdot 10^{-250}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 1.8 \cdot 10^{-182}:\\
\;\;\;\;t \cdot \left(18 \cdot t_3 - a \cdot 4\right)\\
\mathbf{elif}\;b \cdot c \leq 7.8 \cdot 10^{+16}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 1.6 \cdot 10^{+94}:\\
\;\;\;\;t_1 + 18 \cdot \left(t \cdot t_3\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -9.3999999999999997e61Initial program 79.5%
Simplified88.6%
Taylor expanded in b around inf 71.5%
if -9.3999999999999997e61 < (*.f64 b c) < -1.95e-302Initial program 83.7%
Simplified91.0%
Taylor expanded in a around inf 63.2%
*-commutative63.2%
*-commutative63.2%
associate-*r*63.2%
*-commutative63.2%
Simplified63.2%
if -1.95e-302 < (*.f64 b c) < 3.90000000000000027e-250 or 1.79999999999999988e-182 < (*.f64 b c) < 7.8e16Initial program 94.2%
Simplified93.2%
Taylor expanded in i around inf 63.1%
*-commutative63.1%
Simplified63.1%
if 3.90000000000000027e-250 < (*.f64 b c) < 1.79999999999999988e-182Initial program 77.3%
Simplified88.7%
Taylor expanded in t around inf 91.2%
if 7.8e16 < (*.f64 b c) < 1.60000000000000007e94Initial program 90.9%
Simplified99.9%
Taylor expanded in y around inf 82.6%
*-commutative82.6%
Simplified82.6%
if 1.60000000000000007e94 < (*.f64 b c) Initial program 88.0%
Taylor expanded in t around 0 84.6%
Taylor expanded in j around 0 77.3%
Final simplification69.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 (* -27.0 (* j k))) (t_2 (* x (* -4.0 i))))
(if (<= (* b c) -7.2e+153)
(* b c)
(if (<= (* b c) -3e+69)
t_1
(if (<= (* b c) -6.8e+61)
(* b c)
(if (<= (* b c) -3.6e-118)
(* t (* a -4.0))
(if (<= (* b c) -5.6e-282)
t_1
(if (<= (* b c) 5e-324)
t_2
(if (<= (* b c) 1.12e-135)
t_1
(if (<= (* b c) 6.2e+146) t_2 (* b c)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = x * (-4.0 * i);
double tmp;
if ((b * c) <= -7.2e+153) {
tmp = b * c;
} else if ((b * c) <= -3e+69) {
tmp = t_1;
} else if ((b * c) <= -6.8e+61) {
tmp = b * c;
} else if ((b * c) <= -3.6e-118) {
tmp = t * (a * -4.0);
} else if ((b * c) <= -5.6e-282) {
tmp = t_1;
} else if ((b * c) <= 5e-324) {
tmp = t_2;
} else if ((b * c) <= 1.12e-135) {
tmp = t_1;
} else if ((b * c) <= 6.2e+146) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = x * ((-4.0d0) * i)
if ((b * c) <= (-7.2d+153)) then
tmp = b * c
else if ((b * c) <= (-3d+69)) then
tmp = t_1
else if ((b * c) <= (-6.8d+61)) then
tmp = b * c
else if ((b * c) <= (-3.6d-118)) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= (-5.6d-282)) then
tmp = t_1
else if ((b * c) <= 5d-324) then
tmp = t_2
else if ((b * c) <= 1.12d-135) then
tmp = t_1
else if ((b * c) <= 6.2d+146) then
tmp = t_2
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = x * (-4.0 * i);
double tmp;
if ((b * c) <= -7.2e+153) {
tmp = b * c;
} else if ((b * c) <= -3e+69) {
tmp = t_1;
} else if ((b * c) <= -6.8e+61) {
tmp = b * c;
} else if ((b * c) <= -3.6e-118) {
tmp = t * (a * -4.0);
} else if ((b * c) <= -5.6e-282) {
tmp = t_1;
} else if ((b * c) <= 5e-324) {
tmp = t_2;
} else if ((b * c) <= 1.12e-135) {
tmp = t_1;
} else if ((b * c) <= 6.2e+146) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) t_2 = x * (-4.0 * i) tmp = 0 if (b * c) <= -7.2e+153: tmp = b * c elif (b * c) <= -3e+69: tmp = t_1 elif (b * c) <= -6.8e+61: tmp = b * c elif (b * c) <= -3.6e-118: tmp = t * (a * -4.0) elif (b * c) <= -5.6e-282: tmp = t_1 elif (b * c) <= 5e-324: tmp = t_2 elif (b * c) <= 1.12e-135: tmp = t_1 elif (b * c) <= 6.2e+146: tmp = t_2 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) t_2 = Float64(x * Float64(-4.0 * i)) tmp = 0.0 if (Float64(b * c) <= -7.2e+153) tmp = Float64(b * c); elseif (Float64(b * c) <= -3e+69) tmp = t_1; elseif (Float64(b * c) <= -6.8e+61) tmp = Float64(b * c); elseif (Float64(b * c) <= -3.6e-118) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= -5.6e-282) tmp = t_1; elseif (Float64(b * c) <= 5e-324) tmp = t_2; elseif (Float64(b * c) <= 1.12e-135) tmp = t_1; elseif (Float64(b * c) <= 6.2e+146) tmp = t_2; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -27.0 * (j * k);
t_2 = x * (-4.0 * i);
tmp = 0.0;
if ((b * c) <= -7.2e+153)
tmp = b * c;
elseif ((b * c) <= -3e+69)
tmp = t_1;
elseif ((b * c) <= -6.8e+61)
tmp = b * c;
elseif ((b * c) <= -3.6e-118)
tmp = t * (a * -4.0);
elseif ((b * c) <= -5.6e-282)
tmp = t_1;
elseif ((b * c) <= 5e-324)
tmp = t_2;
elseif ((b * c) <= 1.12e-135)
tmp = t_1;
elseif ((b * c) <= 6.2e+146)
tmp = t_2;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -7.2e+153], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3e+69], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -6.8e+61], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.6e-118], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.6e-282], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 5e-324], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.12e-135], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 6.2e+146], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := x \cdot \left(-4 \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -7.2 \cdot 10^{+153}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -3 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -6.8 \cdot 10^{+61}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -3.6 \cdot 10^{-118}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq -5.6 \cdot 10^{-282}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-324}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 1.12 \cdot 10^{-135}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 6.2 \cdot 10^{+146}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -7.2000000000000001e153 or -2.99999999999999983e69 < (*.f64 b c) < -6.80000000000000051e61 or 6.2000000000000004e146 < (*.f64 b c) Initial program 82.9%
Simplified85.6%
associate-*r*86.8%
distribute-rgt-out--82.9%
cancel-sign-sub-inv82.9%
associate-*l*80.2%
fma-def81.6%
associate-*l*81.6%
Applied egg-rr81.6%
Taylor expanded in b around inf 69.9%
if -7.2000000000000001e153 < (*.f64 b c) < -2.99999999999999983e69 or -3.6000000000000002e-118 < (*.f64 b c) < -5.5999999999999998e-282 or 4.94066e-324 < (*.f64 b c) < 1.12e-135Initial program 88.4%
Simplified91.9%
Taylor expanded in j around inf 47.1%
if -6.80000000000000051e61 < (*.f64 b c) < -3.6000000000000002e-118Initial program 80.8%
Simplified92.2%
associate-*r*84.6%
distribute-rgt-out--80.7%
cancel-sign-sub-inv80.7%
associate-*l*76.9%
fma-def80.7%
associate-*l*80.7%
Applied egg-rr80.7%
fma-udef76.9%
*-commutative76.9%
distribute-rgt-neg-in76.9%
metadata-eval76.9%
Applied egg-rr76.9%
+-commutative76.9%
*-commutative76.9%
*-commutative76.9%
associate-*r*80.7%
distribute-rgt-out84.6%
Simplified84.6%
Taylor expanded in a around inf 43.7%
associate-*r*43.7%
*-commutative43.7%
Simplified43.7%
if -5.5999999999999998e-282 < (*.f64 b c) < 4.94066e-324 or 1.12e-135 < (*.f64 b c) < 6.2000000000000004e146Initial program 92.5%
Simplified92.6%
Taylor expanded in x around inf 53.6%
Taylor expanded in t around 0 39.8%
Final simplification50.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) 7.5e+227)
(-
(+ (* b c) (* t (+ (* a -4.0) (* z (* x (* 18.0 y))))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(+ (* j (* k -27.0)) (* b c))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= 7.5e+227) {
tmp = ((b * c) + (t * ((a * -4.0) + (z * (x * (18.0 * y)))))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = (j * (k * -27.0)) + (b * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= 7.5d+227) then
tmp = ((b * c) + (t * ((a * (-4.0d0)) + (z * (x * (18.0d0 * y)))))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
else
tmp = (j * (k * (-27.0d0))) + (b * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= 7.5e+227) {
tmp = ((b * c) + (t * ((a * -4.0) + (z * (x * (18.0 * y)))))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = (j * (k * -27.0)) + (b * c);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= 7.5e+227: tmp = ((b * c) + (t * ((a * -4.0) + (z * (x * (18.0 * y)))))) - ((x * (i * 4.0)) + (j * (k * 27.0))) else: tmp = (j * (k * -27.0)) + (b * c) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= 7.5e+227) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(a * -4.0) + Float64(z * Float64(x * Float64(18.0 * y)))))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= 7.5e+227)
tmp = ((b * c) + (t * ((a * -4.0) + (z * (x * (18.0 * y)))))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
else
tmp = (j * (k * -27.0)) + (b * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], 7.5e+227], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(z * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq 7.5 \cdot 10^{+227}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4 + z \cdot \left(x \cdot \left(18 \cdot y\right)\right)\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < 7.5000000000000003e227Initial program 88.2%
Simplified91.3%
associate-*r*91.7%
distribute-rgt-out--87.8%
cancel-sign-sub-inv87.8%
associate-*l*85.2%
fma-def86.5%
associate-*l*86.5%
Applied egg-rr86.5%
fma-udef85.2%
*-commutative85.2%
distribute-rgt-neg-in85.2%
metadata-eval85.2%
Applied egg-rr85.2%
+-commutative85.2%
*-commutative85.2%
*-commutative85.2%
associate-*r*87.8%
distribute-rgt-out91.7%
Simplified91.7%
if 7.5000000000000003e227 < (*.f64 b c) Initial program 81.5%
Simplified88.8%
Taylor expanded in b around inf 92.8%
Final simplification91.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) 2.16e+276)
(-
(+ (* t (- (* (* y z) (* x 18.0)) (* a 4.0))) (* b c))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(- (- (* b c) (* 4.0 (* x i))) (* 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 ((b * c) <= 2.16e+276) {
tmp = ((t * (((y * z) * (x * 18.0)) - (a * 4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - (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 ((b * c) <= 2.16d+276) then
tmp = ((t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0))) + (b * c)) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
else
tmp = ((b * c) - (4.0d0 * (x * i))) - (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 ((b * c) <= 2.16e+276) {
tmp = ((t * (((y * z) * (x * 18.0)) - (a * 4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - (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 (b * c) <= 2.16e+276: tmp = ((t * (((y * z) * (x * 18.0)) - (a * 4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0))) else: tmp = ((b * c) - (4.0 * (x * i))) - (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 (Float64(b * c) <= 2.16e+276) tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - 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 ((b * c) <= 2.16e+276)
tmp = ((t * (((y * z) * (x * 18.0)) - (a * 4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
else
tmp = ((b * c) - (4.0 * (x * i))) - (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[N[(b * c), $MachinePrecision], 2.16e+276], N[(N[(N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq 2.16 \cdot 10^{+276}:\\
\;\;\;\;\left(t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < 2.16000000000000012e276Initial program 88.5%
Simplified91.6%
if 2.16000000000000012e276 < (*.f64 b c) Initial program 75.0%
Taylor expanded in t around 0 95.0%
Final simplification91.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* -4.0 (* x i)))))
(if (<= (* b c) -4.9e+61)
(+ t_1 (* b c))
(if (<= (* b c) -5.8e-302)
(+ t_1 (* t (* a -4.0)))
(if (<= (* b c) 2.8e-250)
t_2
(if (<= (* b c) 1.3e-184)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= (* b c) 3.2e+55) t_2 (- (* b c) (* 4.0 (* x i))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (-4.0 * (x * i));
double tmp;
if ((b * c) <= -4.9e+61) {
tmp = t_1 + (b * c);
} else if ((b * c) <= -5.8e-302) {
tmp = t_1 + (t * (a * -4.0));
} else if ((b * c) <= 2.8e-250) {
tmp = t_2;
} else if ((b * c) <= 1.3e-184) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if ((b * c) <= 3.2e+55) {
tmp = t_2;
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + ((-4.0d0) * (x * i))
if ((b * c) <= (-4.9d+61)) then
tmp = t_1 + (b * c)
else if ((b * c) <= (-5.8d-302)) then
tmp = t_1 + (t * (a * (-4.0d0)))
else if ((b * c) <= 2.8d-250) then
tmp = t_2
else if ((b * c) <= 1.3d-184) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if ((b * c) <= 3.2d+55) then
tmp = t_2
else
tmp = (b * c) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (-4.0 * (x * i));
double tmp;
if ((b * c) <= -4.9e+61) {
tmp = t_1 + (b * c);
} else if ((b * c) <= -5.8e-302) {
tmp = t_1 + (t * (a * -4.0));
} else if ((b * c) <= 2.8e-250) {
tmp = t_2;
} else if ((b * c) <= 1.3e-184) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if ((b * c) <= 3.2e+55) {
tmp = t_2;
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (-4.0 * (x * i)) tmp = 0 if (b * c) <= -4.9e+61: tmp = t_1 + (b * c) elif (b * c) <= -5.8e-302: tmp = t_1 + (t * (a * -4.0)) elif (b * c) <= 2.8e-250: tmp = t_2 elif (b * c) <= 1.3e-184: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif (b * c) <= 3.2e+55: tmp = t_2 else: tmp = (b * c) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(-4.0 * Float64(x * i))) tmp = 0.0 if (Float64(b * c) <= -4.9e+61) tmp = Float64(t_1 + Float64(b * c)); elseif (Float64(b * c) <= -5.8e-302) tmp = Float64(t_1 + Float64(t * Float64(a * -4.0))); elseif (Float64(b * c) <= 2.8e-250) tmp = t_2; elseif (Float64(b * c) <= 1.3e-184) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (Float64(b * c) <= 3.2e+55) tmp = t_2; else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (-4.0 * (x * i));
tmp = 0.0;
if ((b * c) <= -4.9e+61)
tmp = t_1 + (b * c);
elseif ((b * c) <= -5.8e-302)
tmp = t_1 + (t * (a * -4.0));
elseif ((b * c) <= 2.8e-250)
tmp = t_2;
elseif ((b * c) <= 1.3e-184)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif ((b * c) <= 3.2e+55)
tmp = t_2;
else
tmp = (b * c) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -4.9e+61], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.8e-302], N[(t$95$1 + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.8e-250], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.3e-184], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.2e+55], t$95$2, N[(N[(b * c), $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}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -4.9 \cdot 10^{+61}:\\
\;\;\;\;t_1 + b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -5.8 \cdot 10^{-302}:\\
\;\;\;\;t_1 + t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 2.8 \cdot 10^{-250}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 1.3 \cdot 10^{-184}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;b \cdot c \leq 3.2 \cdot 10^{+55}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -4.90000000000000025e61Initial program 79.5%
Simplified88.6%
Taylor expanded in b around inf 71.5%
if -4.90000000000000025e61 < (*.f64 b c) < -5.79999999999999989e-302Initial program 83.7%
Simplified91.0%
Taylor expanded in a around inf 63.2%
*-commutative63.2%
*-commutative63.2%
associate-*r*63.2%
*-commutative63.2%
Simplified63.2%
if -5.79999999999999989e-302 < (*.f64 b c) < 2.80000000000000028e-250 or 1.29999999999999989e-184 < (*.f64 b c) < 3.2000000000000003e55Initial program 94.5%
Simplified93.6%
Taylor expanded in i around inf 61.9%
*-commutative61.9%
Simplified61.9%
if 2.80000000000000028e-250 < (*.f64 b c) < 1.29999999999999989e-184Initial program 77.3%
Simplified88.7%
Taylor expanded in t around inf 91.2%
if 3.2000000000000003e55 < (*.f64 b c) Initial program 87.5%
Taylor expanded in t around 0 80.9%
Taylor expanded in j around 0 72.8%
Final simplification67.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 (* 4.0 (* x i))) (t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -7.8e+102)
t_2
(if (<= t -1.05e+40)
(+ (* j (* k -27.0)) (* t (* a -4.0)))
(if (<= t -3.8)
t_2
(if (<= t 8.5e+74)
(- (- (* b c) t_1) (* k (* j 27.0)))
(- (* b c) (+ t_1 (* 4.0 (* t a))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -7.8e+102) {
tmp = t_2;
} else if (t <= -1.05e+40) {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
} else if (t <= -3.8) {
tmp = t_2;
} else if (t <= 8.5e+74) {
tmp = ((b * c) - t_1) - (k * (j * 27.0));
} else {
tmp = (b * c) - (t_1 + (4.0 * (t * a)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-7.8d+102)) then
tmp = t_2
else if (t <= (-1.05d+40)) then
tmp = (j * (k * (-27.0d0))) + (t * (a * (-4.0d0)))
else if (t <= (-3.8d0)) then
tmp = t_2
else if (t <= 8.5d+74) then
tmp = ((b * c) - t_1) - (k * (j * 27.0d0))
else
tmp = (b * c) - (t_1 + (4.0d0 * (t * a)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -7.8e+102) {
tmp = t_2;
} else if (t <= -1.05e+40) {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
} else if (t <= -3.8) {
tmp = t_2;
} else if (t <= 8.5e+74) {
tmp = ((b * c) - t_1) - (k * (j * 27.0));
} else {
tmp = (b * c) - (t_1 + (4.0 * (t * a)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -7.8e+102: tmp = t_2 elif t <= -1.05e+40: tmp = (j * (k * -27.0)) + (t * (a * -4.0)) elif t <= -3.8: tmp = t_2 elif t <= 8.5e+74: tmp = ((b * c) - t_1) - (k * (j * 27.0)) else: tmp = (b * c) - (t_1 + (4.0 * (t * a))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -7.8e+102) tmp = t_2; elseif (t <= -1.05e+40) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(a * -4.0))); elseif (t <= -3.8) tmp = t_2; elseif (t <= 8.5e+74) tmp = Float64(Float64(Float64(b * c) - t_1) - Float64(k * Float64(j * 27.0))); else tmp = Float64(Float64(b * c) - Float64(t_1 + Float64(4.0 * Float64(t * a)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -7.8e+102)
tmp = t_2;
elseif (t <= -1.05e+40)
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
elseif (t <= -3.8)
tmp = t_2;
elseif (t <= 8.5e+74)
tmp = ((b * c) - t_1) - (k * (j * 27.0));
else
tmp = (b * c) - (t_1 + (4.0 * (t * a)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, 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, -7.8e+102], t$95$2, If[LessEqual[t, -1.05e+40], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.8], t$95$2, If[LessEqual[t, 8.5e+74], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\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 -7.8 \cdot 10^{+102}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{+40}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;t \leq -3.8:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+74}:\\
\;\;\;\;\left(b \cdot c - t_1\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(t_1 + 4 \cdot \left(t \cdot a\right)\right)\\
\end{array}
\end{array}
if t < -7.7999999999999997e102 or -1.05000000000000005e40 < t < -3.7999999999999998Initial program 74.9%
Simplified89.9%
Taylor expanded in t around inf 76.2%
if -7.7999999999999997e102 < t < -1.05000000000000005e40Initial program 88.1%
Simplified88.1%
Taylor expanded in a around inf 76.8%
*-commutative76.8%
*-commutative76.8%
associate-*r*76.8%
*-commutative76.8%
Simplified76.8%
if -3.7999999999999998 < t < 8.50000000000000028e74Initial program 92.2%
Taylor expanded in t around 0 81.6%
if 8.50000000000000028e74 < t Initial program 82.6%
Taylor expanded in y around 0 78.6%
Taylor expanded in j around 0 74.5%
Final simplification79.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 (<= t -1.2e-8) (+ (* j (* k -27.0)) (* t (+ (* a -4.0) (* 18.0 (* x (* y z)))))) (- (- (* b c) (+ (* 4.0 (* x i)) (* 4.0 (* t a)))) (* k (* j 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1.2e-8) {
tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
} else {
tmp = ((b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)))) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-1.2d-8)) then
tmp = (j * (k * (-27.0d0))) + (t * ((a * (-4.0d0)) + (18.0d0 * (x * (y * z)))))
else
tmp = ((b * c) - ((4.0d0 * (x * i)) + (4.0d0 * (t * a)))) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -1.2e-8) {
tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
} else {
tmp = ((b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)))) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -1.2e-8: tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + (18.0 * (x * (y * z))))) else: tmp = ((b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)))) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -1.2e-8) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(x * Float64(y * z)))))); else tmp = Float64(Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(4.0 * Float64(t * a)))) - Float64(k * Float64(j * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -1.2e-8)
tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
else
tmp = ((b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)))) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -1.2e-8], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-8}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4 + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 4 \cdot \left(t \cdot a\right)\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if t < -1.19999999999999999e-8Initial program 79.6%
Simplified93.1%
Taylor expanded in t around inf 81.9%
if -1.19999999999999999e-8 < t Initial program 89.8%
Taylor expanded in y around 0 86.0%
Final simplification85.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= j -9e+198)
(+ t_1 (* 18.0 (* t (* x (* y z)))))
(if (<= j -2.8e+91)
(+ t_1 (* t (* a -4.0)))
(if (<= j 3.4e+30)
(- (* b c) (+ (* 4.0 (* x i)) (* 4.0 (* t a))))
(+ t_1 (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (j <= -9e+198) {
tmp = t_1 + (18.0 * (t * (x * (y * z))));
} else if (j <= -2.8e+91) {
tmp = t_1 + (t * (a * -4.0));
} else if (j <= 3.4e+30) {
tmp = (b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)));
} else {
tmp = t_1 + (b * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (j <= (-9d+198)) then
tmp = t_1 + (18.0d0 * (t * (x * (y * z))))
else if (j <= (-2.8d+91)) then
tmp = t_1 + (t * (a * (-4.0d0)))
else if (j <= 3.4d+30) then
tmp = (b * c) - ((4.0d0 * (x * i)) + (4.0d0 * (t * a)))
else
tmp = t_1 + (b * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (j <= -9e+198) {
tmp = t_1 + (18.0 * (t * (x * (y * z))));
} else if (j <= -2.8e+91) {
tmp = t_1 + (t * (a * -4.0));
} else if (j <= 3.4e+30) {
tmp = (b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)));
} else {
tmp = t_1 + (b * c);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if j <= -9e+198: tmp = t_1 + (18.0 * (t * (x * (y * z)))) elif j <= -2.8e+91: tmp = t_1 + (t * (a * -4.0)) elif j <= 3.4e+30: tmp = (b * c) - ((4.0 * (x * i)) + (4.0 * (t * a))) else: tmp = t_1 + (b * c) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (j <= -9e+198) tmp = Float64(t_1 + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))); elseif (j <= -2.8e+91) tmp = Float64(t_1 + Float64(t * Float64(a * -4.0))); elseif (j <= 3.4e+30) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(4.0 * Float64(t * a)))); else tmp = Float64(t_1 + Float64(b * c)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if (j <= -9e+198)
tmp = t_1 + (18.0 * (t * (x * (y * z))));
elseif (j <= -2.8e+91)
tmp = t_1 + (t * (a * -4.0));
elseif (j <= 3.4e+30)
tmp = (b * c) - ((4.0 * (x * i)) + (4.0 * (t * a)));
else
tmp = t_1 + (b * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -9e+198], N[(t$95$1 + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -2.8e+91], N[(t$95$1 + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.4e+30], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;j \leq -9 \cdot 10^{+198}:\\
\;\;\;\;t_1 + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;j \leq -2.8 \cdot 10^{+91}:\\
\;\;\;\;t_1 + t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;j \leq 3.4 \cdot 10^{+30}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 4 \cdot \left(t \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + b \cdot c\\
\end{array}
\end{array}
if j < -9.00000000000000003e198Initial program 94.9%
Simplified94.8%
Taylor expanded in y around inf 81.5%
*-commutative81.5%
Simplified81.5%
if -9.00000000000000003e198 < j < -2.7999999999999999e91Initial program 89.5%
Simplified89.8%
Taylor expanded in a around inf 70.1%
*-commutative70.1%
*-commutative70.1%
associate-*r*70.1%
*-commutative70.1%
Simplified70.1%
if -2.7999999999999999e91 < j < 3.4000000000000002e30Initial program 87.1%
Taylor expanded in y around 0 76.6%
Taylor expanded in j around 0 70.2%
if 3.4000000000000002e30 < j Initial program 85.5%
Simplified91.9%
Taylor expanded in b around inf 62.4%
Final simplification69.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 4.0 (* x i))))
(if (<= t -7.2e-9)
(+ (* j (* k -27.0)) (* t (+ (* a -4.0) (* 18.0 (* x (* y z))))))
(if (<= t 1.7e+74)
(- (- (* b c) t_1) (* k (* j 27.0)))
(- (* b c) (+ t_1 (* 4.0 (* t a))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double tmp;
if (t <= -7.2e-9) {
tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
} else if (t <= 1.7e+74) {
tmp = ((b * c) - t_1) - (k * (j * 27.0));
} else {
tmp = (b * c) - (t_1 + (4.0 * (t * a)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
if (t <= (-7.2d-9)) then
tmp = (j * (k * (-27.0d0))) + (t * ((a * (-4.0d0)) + (18.0d0 * (x * (y * z)))))
else if (t <= 1.7d+74) then
tmp = ((b * c) - t_1) - (k * (j * 27.0d0))
else
tmp = (b * c) - (t_1 + (4.0d0 * (t * a)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double tmp;
if (t <= -7.2e-9) {
tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
} else if (t <= 1.7e+74) {
tmp = ((b * c) - t_1) - (k * (j * 27.0));
} else {
tmp = (b * c) - (t_1 + (4.0 * (t * a)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) tmp = 0 if t <= -7.2e-9: tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + (18.0 * (x * (y * z))))) elif t <= 1.7e+74: tmp = ((b * c) - t_1) - (k * (j * 27.0)) else: tmp = (b * c) - (t_1 + (4.0 * (t * a))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if (t <= -7.2e-9) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(x * Float64(y * z)))))); elseif (t <= 1.7e+74) tmp = Float64(Float64(Float64(b * c) - t_1) - Float64(k * Float64(j * 27.0))); else tmp = Float64(Float64(b * c) - Float64(t_1 + Float64(4.0 * Float64(t * a)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
tmp = 0.0;
if (t <= -7.2e-9)
tmp = (j * (k * -27.0)) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
elseif (t <= 1.7e+74)
tmp = ((b * c) - t_1) - (k * (j * 27.0));
else
tmp = (b * c) - (t_1 + (4.0 * (t * a)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e-9], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e+74], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{-9}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4 + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+74}:\\
\;\;\;\;\left(b \cdot c - t_1\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(t_1 + 4 \cdot \left(t \cdot a\right)\right)\\
\end{array}
\end{array}
if t < -7.2e-9Initial program 79.6%
Simplified93.1%
Taylor expanded in t around inf 81.9%
if -7.2e-9 < t < 1.7e74Initial program 92.1%
Taylor expanded in t around 0 82.0%
if 1.7e74 < t Initial program 82.6%
Taylor expanded in y around 0 78.6%
Taylor expanded in j around 0 74.5%
Final simplification80.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
(if (<= j -1.05e+192)
(- (* b c) (* 27.0 (* j k)))
(if (or (<= j -5.5e+90) (not (<= j 4.7e-46)))
(+ (* j (* k -27.0)) (* -4.0 (* x i)))
(- (* b c) (* 4.0 (* x i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -1.05e+192) {
tmp = (b * c) - (27.0 * (j * k));
} else if ((j <= -5.5e+90) || !(j <= 4.7e-46)) {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (j <= (-1.05d+192)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if ((j <= (-5.5d+90)) .or. (.not. (j <= 4.7d-46))) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (x * i))
else
tmp = (b * c) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -1.05e+192) {
tmp = (b * c) - (27.0 * (j * k));
} else if ((j <= -5.5e+90) || !(j <= 4.7e-46)) {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -1.05e+192: tmp = (b * c) - (27.0 * (j * k)) elif (j <= -5.5e+90) or not (j <= 4.7e-46): tmp = (j * (k * -27.0)) + (-4.0 * (x * i)) else: tmp = (b * c) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (j <= -1.05e+192) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif ((j <= -5.5e+90) || !(j <= 4.7e-46)) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(x * i))); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (j <= -1.05e+192)
tmp = (b * c) - (27.0 * (j * k));
elseif ((j <= -5.5e+90) || ~((j <= 4.7e-46)))
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
else
tmp = (b * c) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[j, -1.05e+192], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[j, -5.5e+90], N[Not[LessEqual[j, 4.7e-46]], $MachinePrecision]], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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}\;j \leq -1.05 \cdot 10^{+192}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;j \leq -5.5 \cdot 10^{+90} \lor \neg \left(j \leq 4.7 \cdot 10^{-46}\right):\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if j < -1.04999999999999997e192Initial program 95.4%
Taylor expanded in t around 0 78.0%
Taylor expanded in i around 0 74.5%
if -1.04999999999999997e192 < j < -5.49999999999999999e90 or 4.69999999999999966e-46 < j Initial program 87.1%
Simplified92.5%
Taylor expanded in i around inf 50.0%
*-commutative50.0%
Simplified50.0%
if -5.49999999999999999e90 < j < 4.69999999999999966e-46Initial program 86.5%
Taylor expanded in t around 0 59.4%
Taylor expanded in j around 0 52.9%
Final simplification53.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= j -2.9e+226)
(+ t_1 (* b c))
(if (<= j -2.5e+74)
(+ t_1 (* t (* a -4.0)))
(if (<= j 1.85e-39)
(- (* b c) (* 4.0 (* x i)))
(+ t_1 (* -4.0 (* x i))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (j <= -2.9e+226) {
tmp = t_1 + (b * c);
} else if (j <= -2.5e+74) {
tmp = t_1 + (t * (a * -4.0));
} else if (j <= 1.85e-39) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1 + (-4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (j <= (-2.9d+226)) then
tmp = t_1 + (b * c)
else if (j <= (-2.5d+74)) then
tmp = t_1 + (t * (a * (-4.0d0)))
else if (j <= 1.85d-39) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t_1 + ((-4.0d0) * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (j <= -2.9e+226) {
tmp = t_1 + (b * c);
} else if (j <= -2.5e+74) {
tmp = t_1 + (t * (a * -4.0));
} else if (j <= 1.85e-39) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1 + (-4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if j <= -2.9e+226: tmp = t_1 + (b * c) elif j <= -2.5e+74: tmp = t_1 + (t * (a * -4.0)) elif j <= 1.85e-39: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t_1 + (-4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (j <= -2.9e+226) tmp = Float64(t_1 + Float64(b * c)); elseif (j <= -2.5e+74) tmp = Float64(t_1 + Float64(t * Float64(a * -4.0))); elseif (j <= 1.85e-39) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if (j <= -2.9e+226)
tmp = t_1 + (b * c);
elseif (j <= -2.5e+74)
tmp = t_1 + (t * (a * -4.0));
elseif (j <= 1.85e-39)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = t_1 + (-4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -2.9e+226], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -2.5e+74], N[(t$95$1 + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.85e-39], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + 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}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;j \leq -2.9 \cdot 10^{+226}:\\
\;\;\;\;t_1 + b \cdot c\\
\mathbf{elif}\;j \leq -2.5 \cdot 10^{+74}:\\
\;\;\;\;t_1 + t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;j \leq 1.85 \cdot 10^{-39}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + -4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if j < -2.89999999999999974e226Initial program 91.7%
Simplified91.7%
Taylor expanded in b around inf 91.8%
if -2.89999999999999974e226 < j < -2.49999999999999982e74Initial program 93.5%
Simplified93.7%
Taylor expanded in a around inf 72.7%
*-commutative72.7%
*-commutative72.7%
associate-*r*72.7%
*-commutative72.7%
Simplified72.7%
if -2.49999999999999982e74 < j < 1.85000000000000007e-39Initial program 86.1%
Taylor expanded in t around 0 59.6%
Taylor expanded in j around 0 53.6%
if 1.85000000000000007e-39 < j Initial program 86.8%
Simplified93.4%
Taylor expanded in i around inf 50.2%
*-commutative50.2%
Simplified50.2%
Final simplification56.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= i -2.9e+128) (and (not (<= i 1.9e+227)) (<= i 1.2e+284))) (* x (* -4.0 i)) (+ (* j (* k -27.0)) (* b c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((i <= -2.9e+128) || (!(i <= 1.9e+227) && (i <= 1.2e+284))) {
tmp = x * (-4.0 * i);
} else {
tmp = (j * (k * -27.0)) + (b * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 ((i <= (-2.9d+128)) .or. (.not. (i <= 1.9d+227)) .and. (i <= 1.2d+284)) then
tmp = x * ((-4.0d0) * i)
else
tmp = (j * (k * (-27.0d0))) + (b * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 ((i <= -2.9e+128) || (!(i <= 1.9e+227) && (i <= 1.2e+284))) {
tmp = x * (-4.0 * i);
} else {
tmp = (j * (k * -27.0)) + (b * c);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (i <= -2.9e+128) or (not (i <= 1.9e+227) and (i <= 1.2e+284)): tmp = x * (-4.0 * i) else: tmp = (j * (k * -27.0)) + (b * c) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((i <= -2.9e+128) || (!(i <= 1.9e+227) && (i <= 1.2e+284))) tmp = Float64(x * Float64(-4.0 * i)); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((i <= -2.9e+128) || (~((i <= 1.9e+227)) && (i <= 1.2e+284)))
tmp = x * (-4.0 * i);
else
tmp = (j * (k * -27.0)) + (b * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[i, -2.9e+128], And[N[Not[LessEqual[i, 1.9e+227]], $MachinePrecision], LessEqual[i, 1.2e+284]]], N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;i \leq -2.9 \cdot 10^{+128} \lor \neg \left(i \leq 1.9 \cdot 10^{+227}\right) \land i \leq 1.2 \cdot 10^{+284}:\\
\;\;\;\;x \cdot \left(-4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\end{array}
\end{array}
if i < -2.9e128 or 1.90000000000000018e227 < i < 1.2e284Initial program 86.4%
Simplified86.4%
Taylor expanded in x around inf 74.4%
Taylor expanded in t around 0 70.7%
if -2.9e128 < i < 1.90000000000000018e227 or 1.2e284 < i Initial program 87.7%
Simplified92.2%
Taylor expanded in b around inf 52.6%
Final simplification56.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= j -5.9e+50) (not (<= j 9e-22))) (+ (* j (* k -27.0)) (* b c)) (- (* b c) (* 4.0 (* x i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((j <= -5.9e+50) || !(j <= 9e-22)) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((j <= (-5.9d+50)) .or. (.not. (j <= 9d-22))) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else
tmp = (b * c) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((j <= -5.9e+50) || !(j <= 9e-22)) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (j <= -5.9e+50) or not (j <= 9e-22): tmp = (j * (k * -27.0)) + (b * c) else: tmp = (b * c) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((j <= -5.9e+50) || !(j <= 9e-22)) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((j <= -5.9e+50) || ~((j <= 9e-22)))
tmp = (j * (k * -27.0)) + (b * c);
else
tmp = (b * c) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[j, -5.9e+50], N[Not[LessEqual[j, 9e-22]], $MachinePrecision]], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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}\;j \leq -5.9 \cdot 10^{+50} \lor \neg \left(j \leq 9 \cdot 10^{-22}\right):\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if j < -5.8999999999999998e50 or 8.99999999999999973e-22 < j Initial program 87.6%
Simplified92.6%
Taylor expanded in b around inf 59.9%
if -5.8999999999999998e50 < j < 8.99999999999999973e-22Initial program 87.4%
Taylor expanded in t around 0 60.5%
Taylor expanded in j around 0 54.4%
Final simplification57.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 (or (<= i -6.5e+127) (not (<= i 1.4e+126))) (- (* b c) (* 4.0 (* x i))) (- (* 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 ((i <= -6.5e+127) || !(i <= 1.4e+126)) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (b * c) - (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 ((i <= (-6.5d+127)) .or. (.not. (i <= 1.4d+126))) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = (b * c) - (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 ((i <= -6.5e+127) || !(i <= 1.4e+126)) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (b * c) - (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 (i <= -6.5e+127) or not (i <= 1.4e+126): tmp = (b * c) - (4.0 * (x * i)) else: tmp = (b * c) - (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 ((i <= -6.5e+127) || !(i <= 1.4e+126)) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(b * c) - 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 ((i <= -6.5e+127) || ~((i <= 1.4e+126)))
tmp = (b * c) - (4.0 * (x * i));
else
tmp = (b * c) - (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[i, -6.5e+127], N[Not[LessEqual[i, 1.4e+126]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;i \leq -6.5 \cdot 10^{+127} \lor \neg \left(i \leq 1.4 \cdot 10^{+126}\right):\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if i < -6.5e127 or 1.40000000000000005e126 < i Initial program 83.4%
Taylor expanded in t around 0 81.6%
Taylor expanded in j around 0 76.3%
if -6.5e127 < i < 1.40000000000000005e126Initial program 89.3%
Taylor expanded in t around 0 58.4%
Taylor expanded in i around 0 52.4%
Final simplification59.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= c -4.8e-60)
(* b c)
(if (<= c 9.5e-117)
(* -27.0 (* j k))
(if (<= c 2.8e+114) (* t (* a -4.0)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -4.8e-60) {
tmp = b * c;
} else if (c <= 9.5e-117) {
tmp = -27.0 * (j * k);
} else if (c <= 2.8e+114) {
tmp = t * (a * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (c <= (-4.8d-60)) then
tmp = b * c
else if (c <= 9.5d-117) then
tmp = (-27.0d0) * (j * k)
else if (c <= 2.8d+114) then
tmp = t * (a * (-4.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -4.8e-60) {
tmp = b * c;
} else if (c <= 9.5e-117) {
tmp = -27.0 * (j * k);
} else if (c <= 2.8e+114) {
tmp = t * (a * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if c <= -4.8e-60: tmp = b * c elif c <= 9.5e-117: tmp = -27.0 * (j * k) elif c <= 2.8e+114: tmp = t * (a * -4.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (c <= -4.8e-60) tmp = Float64(b * c); elseif (c <= 9.5e-117) tmp = Float64(-27.0 * Float64(j * k)); elseif (c <= 2.8e+114) tmp = Float64(t * Float64(a * -4.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (c <= -4.8e-60)
tmp = b * c;
elseif (c <= 9.5e-117)
tmp = -27.0 * (j * k);
elseif (c <= 2.8e+114)
tmp = t * (a * -4.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[c, -4.8e-60], N[(b * c), $MachinePrecision], If[LessEqual[c, 9.5e-117], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.8e+114], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -4.8 \cdot 10^{-60}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 9.5 \cdot 10^{-117}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;c \leq 2.8 \cdot 10^{+114}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -4.80000000000000019e-60 or 2.8e114 < c Initial program 86.4%
Simplified90.7%
associate-*r*91.5%
distribute-rgt-out--86.4%
cancel-sign-sub-inv86.4%
associate-*l*84.8%
fma-def87.3%
associate-*l*87.3%
Applied egg-rr87.3%
Taylor expanded in b around inf 42.3%
if -4.80000000000000019e-60 < c < 9.5000000000000004e-117Initial program 89.1%
Simplified90.3%
Taylor expanded in j around inf 30.4%
if 9.5000000000000004e-117 < c < 2.8e114Initial program 87.0%
Simplified89.2%
associate-*r*86.9%
distribute-rgt-out--86.9%
cancel-sign-sub-inv86.9%
associate-*l*80.4%
fma-def80.4%
associate-*l*80.4%
Applied egg-rr80.4%
fma-udef80.4%
*-commutative80.4%
distribute-rgt-neg-in80.4%
metadata-eval80.4%
Applied egg-rr80.4%
+-commutative80.4%
*-commutative80.4%
*-commutative80.4%
associate-*r*86.9%
distribute-rgt-out86.9%
Simplified86.9%
Taylor expanded in a around inf 29.8%
associate-*r*29.8%
*-commutative29.8%
Simplified29.8%
Final simplification35.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= c -5.7e-52) (not (<= c 1.06e+118))) (* 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 ((c <= -5.7e-52) || !(c <= 1.06e+118)) {
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 ((c <= (-5.7d-52)) .or. (.not. (c <= 1.06d+118))) 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 ((c <= -5.7e-52) || !(c <= 1.06e+118)) {
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 (c <= -5.7e-52) or not (c <= 1.06e+118): 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 ((c <= -5.7e-52) || !(c <= 1.06e+118)) 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 ((c <= -5.7e-52) || ~((c <= 1.06e+118)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[c, -5.7e-52], N[Not[LessEqual[c, 1.06e+118]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -5.7 \cdot 10^{-52} \lor \neg \left(c \leq 1.06 \cdot 10^{+118}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if c < -5.6999999999999997e-52 or 1.06e118 < c Initial program 86.2%
Simplified90.6%
associate-*r*91.3%
distribute-rgt-out--86.1%
cancel-sign-sub-inv86.1%
associate-*l*84.5%
fma-def87.1%
associate-*l*87.1%
Applied egg-rr87.1%
Taylor expanded in b around inf 43.0%
if -5.6999999999999997e-52 < c < 1.06e118Initial program 88.6%
Simplified90.8%
Taylor expanded in j around inf 27.8%
Final simplification34.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* 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 87.5%
Simplified90.3%
associate-*r*90.6%
distribute-rgt-out--87.1%
cancel-sign-sub-inv87.1%
associate-*l*84.8%
fma-def86.0%
associate-*l*86.0%
Applied egg-rr86.0%
Taylor expanded in b around inf 25.3%
Final simplification25.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
herbie shell --seed 2023332
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:herbie-target
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))