Changeset af7c47 in git for Singular/LIB/modular.lib


Ignore:
Timestamp:
Sep 7, 2016, 2:21:21 PM (8 years ago)
Author:
Andreas Steenpass <steenpass@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
a88bbe6011f0f3b0eec150334d2c6243aa1f57ad
Parents:
78321f7f1ef646d795a532545c8159f388de4136
Message:
fix: sort the indices returned by deleteUnluckyPrimes()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/modular.lib

    r78321f raf7c47  
    4040";
    4141
     42LIB "general.lib";
    4243LIB "resources.lib";
    4344LIB "tasks.lib";
     
    157158        // delete unlucky primes
    158159        indices = deleteUnluckyPrimes(modresults);
     160        indices = sort(indices)[1];
     161        for (i = size(indices); i > 1; i--) {
     162            if (indices[i] == indices[i-1]) {
     163                indices = delete(indices, i);
     164            }
     165        }
    159166        for (i = size(indices); i > 0; i--) {
    160167            modresults = delete(modresults, indices[i]);
Note: See TracChangeset for help on using the changeset viewer.