Changeset f1c465f in git


Ignore:
Timestamp:
Jun 21, 2010, 7:46:24 PM (14 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
abca39190db801f0125cf1a47ca64dcd18437478
Parents:
4d1ae5af2805ed797a6a992f88a4bb83fbc625f8
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2010-06-21 19:46:24+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:55:15+01:00
Message:
More ring fixes... rmodulo* are still buggy (TODO: Frank)
Location:
coeffs
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • coeffs/coeffs.h

    • Property mode changed from 100755 to 100644
  • coeffs/config.h.in

    r4d1ae5 rf1c465f  
     1#include <auxiliary.h>
     2
    13// #define assume(x) ((void) 0)
    24#define memcpy4 memcpy
  • coeffs/gnumpfl.cc

    r4d1ae5 rf1c465f  
    406406}
    407407
    408 static BOOLEAN ngfCoeffsEqual(const coeffs r, n_coeffType n, int)
     408static BOOLEAN ngfCoeffsEqual(const coeffs r, n_coeffType n, void*)
    409409{
    410410  assume( getCoeffType(r) == ID );
  • coeffs/gnumpfl.h

    r4d1ae5 rf1c465f  
    1717
    1818/// test, whether r is an instance of nInitCoeffs(n, parameter) */
    19 static BOOLEAN ngfCoeffsEqual(const coeffs r, n_coeffType n, int parameter);
     19static BOOLEAN ngfCoeffsEqual(const coeffs r, n_coeffType n, void*);
    2020
    2121
  • coeffs/longrat.h

    r4d1ae5 rf1c465f  
    6969int      nlInt(number &n, const coeffs r);
    7070number   nlBigInt(number &n);
     71
    7172#ifdef HAVE_RINGS
    7273void     nlGMP(number &i, number n, const coeffs r);
    7374#endif
     75
    7476BOOLEAN  nlGreaterZero(number za, const coeffs r);
    7577number   nlInvers(number a, const coeffs r);
  • coeffs/numbers.cc

    • Property mode changed from 100755 to 100644
  • coeffs/rintegers.cc

    r4d1ae5 rf1c465f  
    66* ABSTRACT: numbers modulo n
    77*/
     8#include "config.h"
     9
     10#ifdef HAVE_RINGS
    811
    912#include <string.h>
     
    1922#include <si_gmp.h>
    2023
    21 #ifdef HAVE_RINGS
    2224
    2325omBin gmp_nrz_bin = omGetSpecBin(sizeof(mpz_t));
  • coeffs/rmodulo2m.cc

    • Property mode changed from 100755 to 100644
    r4d1ae5 rf1c465f  
    77*/
    88
    9 #include <string.h>
    109#include "config.h"
    1110#include <auxiliary.h>
    1211
    1312#ifdef HAVE_RINGS
     13
    1414#include <mylimits.h>
    1515#include "coeffs.h"
     
    2121#include "rmodulo2m.h"
    2222#include "si_gmp.h"
     23
     24#include <string.h>
    2325
    2426int nr2mExp;
  • coeffs/rmodulo2m.h

    • Property mode changed from 100755 to 100644
    r4d1ae5 rf1c465f  
    1010#ifdef HAVE_RINGS
    1111#include "coeffs.h"
     12#include "rintegers.h"
     13
     14#ifndef NATNUMBER
     15#define NATNUMBER unsigned long
     16#endif
     17
     18
     19void    nr2mInitChar    (coeffs r, void*);
    1220
    1321extern int nr2mExp;
     
    1523                               bit pattern '11..1' of length m */
    1624
    17 void    nr2mInitChar    (coeffs r, void*);
     25number  nr2mCopy        (number a, const coeffs r);
    1826BOOLEAN nr2mGreaterZero (number k, const coeffs r);
    1927number  nr2mMult        (number a, number b, const coeffs r);
  • coeffs/rmodulon.cc

    • Property mode changed from 100755 to 100644
    r4d1ae5 rf1c465f  
    77*/
    88
    9 #include <string.h>
    109#include "config.h"
    1110#include <auxiliary.h>
    1211
    1312#ifdef HAVE_RINGS
     13
    1414#include <mylimits.h>
    1515#include "coeffs.h"
     
    2121#include "rmodulon.h"
    2222#include "si_gmp.h"
     23
     24#include <string.h>
    2325
    2426extern omBin gmp_nrz_bin;
     
    446448  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
    447449  mpz_init(erg);
    448   nlGMP(from, (number) erg, dst);
    449   mpz_mod(erg, erg, dst->nrnModul);
     450  nlGMP(from, (number) erg, src);
     451  mpz_mod(erg, erg, src->nrnModul);
    450452  return (number) erg;
    451453}
  • coeffs/rmodulon.h

    • Property mode changed from 100755 to 100644
  • coeffs/test.cc

    • Property mode changed from 100755 to 100644
    r4d1ae5 rf1c465f  
    1111#include <gnumpc.h>
    1212#include <shortfl.h>
     13
     14
    1315#include <rmodulon.h>
    1416#include <rmodulo2m.h>
     
    4042{
    4143
    42   cout << "Testing coeffs: [" << type << "]: " << endl;
     44  cout  << endl << "----------------------- Testing coeffs: [" << type <<
     45                "]: -----------------------" << endl;
    4346
    4447  const coeffs r = nInitChar( type, NULL );
     
    8487//    assume( r->cfDelete == nrDelete ); // No?
    8588  }
     89#ifdef HAVE_RINGS
    8690  else if( type == n_Z2m )
    8791  {
     
    98102    assume( r->cfDelete == nrnDelete );
    99103  }
     104#endif 
    100105  else
    101106  {
     
    135140    c ++;
    136141
     142#ifdef HAVE_RINGS
    137143  type = nRegister( n_Zn, nrnInitChar); assume( type == n_Zn );
    138144  if( Test(type) )
    139145    c ++;
     146
    140147 
    141148  type = nRegister( n_Z2m, nr2mInitChar); assume( type == n_Z2m );
    142149  if( Test(type) )
    143150    c ++;
    144 
     151#endif
     152 
    145153  return c;
    146154
Note: See TracChangeset for help on using the changeset viewer.