Changeset 3ab2c6 in git for Singular


Ignore:
Timestamp:
Feb 19, 2020, 1:20:21 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
c824c00076c780d82b72182d73bd00ce123b3beb
Parents:
a962f61f9e0ac32ab10921651f4f7b6903387331
Message:
fix: cyclotomic was defined in invar.lib and finvar.lib (removed from invar)
Location:
Singular/LIB
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/finvar.lib

    ra962f6 r3ab2c6  
    124124      min=s[2,1];
    125125    }
    126     if (n*j==i)                        // the earliest possible point to break
    127     { break;
    128     }
     126    if (n*j==i) break;                 // the earliest possible point to break
    129127    j++;
    130128  }
  • Singular/LIB/invar.lib

    ra962f6 r3ab2c6  
    1616  SLreynolds(f)          applies the Reynolds operator to f
    1717  torusreynolds(f)       applies the Reynolds operator to f if the group is a torus or a finite group.
    18   cyclotomic(n,z)        the n-th cyclotomic polynomial in the variable z.
    1918";
    2019LIB "matrix.lib";
     20LIB "finvar.lib"; // for cyclotomic
    2121
    2222////////////////////////////////////////////////////////////////////////////////
     
    362362
    363363////////////////////////////////////////////////////////////////////////////////
    364 // cyclotomic(n,z) gives the n-th cyclotomic polynomial in z, where z is
    365 // a variable.
    366 ////////////////////////////////////////////////////////////////////////////////
    367 proc cyclotomic(n,poly z)
    368 "USAGE: cyclotomic(n,z) int n, variable z
    369 RETURNS:  the n-th cyclotomic polynomial in z"
    370 {       poly h=z**n-1;
    371         ideal id=h;
    372         id=std(id);
    373         poly f=z-1;
    374         int i=prime(n-1);
    375         while(i<>2)
    376                 {if (n%i==0) {f=f*(z**(n div i)-1);};
    377                 i=prime(i-1);};
    378         if (n%2==0) {f=f*(z**(n div 2)-1);};
    379         h=h/gcd(f,h);
    380         return(h/leadcoef(h));
    381 }
    382 
    383 ////////////////////////////////////////////////////////////////////////////////
    384364// finite(n) sets the current group to a finite group of order n.
    385365////////////////////////////////////////////////////////////////////////////////
     
    396376{       ring group=0,(g(1),g(2)),dp(2);
    397377        export group;
    398         ideal groupideal=g(2)^n-1,cyclotomic(n,g(1));
     378        ideal groupideal=g(2)^n-1,cyclotomic(n);
    399379        groupideal=std(groupideal);
    400380        export groupideal;
Note: See TracChangeset for help on using the changeset viewer.