aboutsummaryrefslogtreecommitdiff
path: root/src/math/subgroups.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/subgroups.c')
-rw-r--r--src/math/subgroups.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/math/subgroups.c b/src/math/subgroups.c
index 93526ae..5ca2fde 100644
--- a/src/math/subgroups.c
+++ b/src/math/subgroups.c
@@ -77,17 +77,8 @@ static GEN subgroups_2n_factors(GEN factors, size_t min_bits) {
avma = btop;
}
}
- GEN sorted = sort(groups);
- size_t k = 1;
- for (size_t j = 1; j <= i; j++) {
- GEN k_value = gel(sorted, k);
- GEN j_value = gel(sorted, j);
- if (!gequal(k_value, j_value)) {
- gel(sorted, ++k) = j_value;
- }
- }
- sorted = vec_shorten(sorted, k);
- return sorted;
+ GEN ret = gtoset(groups);
+ return ret;
}
/**