Changeset 616d685 in git


Ignore:
Timestamp:
Jan 23, 2014, 1:53:48 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c5facdfddea2addfd91babd8b9019161dea4b695')
Children:
5c8e18ff3dc32f83461ed21cad1151a77366ed56
Parents:
e79e263afc119eeedd5b0ae93a7554cd2ca25396
Message:
add: farey for alg./trans. extensions
Location:
libpolys/polys/ext_fields
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/ext_fields/algext.cc

    re79e26 r616d685  
    13911391}
    13921392
     1393number  naFarey(number p, number n, const coeffs cf)
     1394{
     1395  // n is really a bigint
     1396  poly result=p_Farey(p_Copy((poly)p,cf->extRing),n,cf->extRing);
     1397  return ((number)result);
     1398}
     1399
    13931400
    13941401BOOLEAN naInitChar(coeffs cf, void * infoStruct)
     
    14321439  cf->cfInit         = naInit;
    14331440  cf->cfInit_bigint  = naInit_bigint;
    1434   // cf->cfFarey
     1441  cf->cfFarey        = naFarey;
    14351442  cf->cfChineseRemainder= naChineseRemainder;
    14361443  cf->cfInt          = naInt;
  • libpolys/polys/ext_fields/transext.cc

    re79e26 r616d685  
    23862386}
    23872387
     2388number  ntFarey(number p, number n, const coeffs cf)
     2389{
     2390  // n is really a bigint
     2391  fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
     2392  NUM(result)=p_Farey(p_Copy(NUM((fraction)p),cf->extRing),n,cf->extRing);
     2393  DEN(result)=p_Farey(p_Copy(DEN((fraction)p),cf->extRing),n,cf->extRing);
     2394  return ((number)result);
     2395}
     2396
    23882397BOOLEAN ntInitChar(coeffs cf, void * infoStruct)
    23892398{
     
    24212430  cf->cfInit         = ntInit;
    24222431  cf->cfInit_bigint  = ntInit_bigint;
    2423   //cf->cfFarey
     2432  cf->cfFarey        = ntFarey;
    24242433  cf->cfChineseRemainder = ntChineseRemainder;
    24252434  cf->cfInt          = ntInt;
Note: See TracChangeset for help on using the changeset viewer.