Changeset d0a51ee in git


Ignore:
Timestamp:
May 5, 2010, 4:42:53 PM (13 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
371bc5f2b1adfa76d36a0242eb9c7d7cb44b9b92
Parents:
3510a61a2a6264c7487502f0c82c410e2f92369f
git-author:
Martin Lee <martinlee84@web.de>2010-05-05 16:42:53+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:51:40+01:00
Message:
more changes to ffields.cc and coeffs.h
Location:
coeffs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • coeffs/coeffs.h

    r3510a6 rd0a51ee  
    154154  short      float_len; /* additional char-flags, rInit */
    155155  short      float_len2; /* additional char-flags, rInit */
     156
     157  BOOLEAN   ShortOut; /// ffields need this.
     158
    156159};
    157160
  • coeffs/ffields.cc

    r3510a6 rd0a51ee  
    1414#include "numbers.h"
    1515#include "ffields.h"
     16
     17
     18typedef void* ADDRESS;
     19
     20#define MAX_INT_LEN 11
    1621
    1722int nfCharQ=0;  /* the number of elemts: q*/
     
    106111        s-=l;
    107112        Werror("`%s` greater than %d(max. integer representation)",
    108                 s,MAX_INT_VAL);
     113                s,INT_MAX);
    109114        return s;
    110115      }
     
    484489      *i *= 10;
    485490      *i += *s++ - '0';
    486       if (*i > (MAX_INT_VAL / 10)) *i = *i % nfCharP;
     491      if (*i > (INT_MAX / 10)) *i = *i % nfCharP;
    487492    }
    488493    while (*s >= '0' && *s <= '9');
     
    564569int nfMinPoly[16];
    565570
    566 void nfShowMipo()
     571void nfShowMipo(const coeffs r)
    567572{
    568573  int i=nfMinPoly[0];
     
    572577    j++;
    573578    if (nfMinPoly[j]!=0)
    574       StringAppend("%d*%s^%d",nfMinPoly[j],currRing->parameter[0],i);
     579      StringAppend("%d*%s^%d",nfMinPoly[j],r->parameter[0],i);
    575580    i--;
    576581    if(i<0) break;
     
    692697* map Z/p -> GF(p,n)
    693698*/
    694 number nfMapP(number c)
    695 {
    696   return nfInit((int)((long)c), currRing);
     699number nfMapP(number c, const coeffs src, const coeffs dst)
     700{
     701  return nfInit((int)((long)c), dst);
    697702}
    698703
     
    701706*/
    702707int nfMapGG_factor;
    703 number nfMapGG(number c)
     708number nfMapGG(number c, const coeffs src, const coeffs dst)
    704709{
    705710  int i=(long)c;
     
    711716* map GF(p,n1) -> GF(p,n2), n1 > n2, n2 | n1
    712717*/
    713 number nfMapGGrev(number c)
     718number nfMapGGrev(number c, const coeffs src, const coeffs dst)
    714719{
    715720  int ex=(int)((long)c);
     
    723728* set map function nMap ... -> GF(p,n)
    724729*/
    725 nMapFunc nfSetMap(const ring src, const ring dst)
     730nMapFunc nfSetMap(const coeffs r, const coeffs src, const coeffs dst)
    726731{
    727732  if (nField_is_GF(src,nfCharQ))
    728733  {
    729     return ndCopy;   /* GF(p,n) -> GF(p,n) */
     734    return ndCopyMap;   /* GF(p,n) -> GF(p,n) */
    730735  }
    731736  if (nField_is_GF(src))
     
    744749      if ((n2 % n1)==0)
    745750      {
    746         int save_ch=currRing->ch;
    747         char **save_par=currRing->parameter;
     751        int save_ch=r->ch;
     752        char **save_par=r->parameter;
    748753        nfSetChar(src->ch,src->parameter);
    749754        int nn=nfPlus1Table[0];
Note: See TracChangeset for help on using the changeset viewer.