Changeset 1b078e in git


Ignore:
Timestamp:
Aug 27, 2010, 4:48:16 PM (14 years ago)
Author:
Martin Lee <mlee@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd25190065115c859833252500a64cfb7b11e3a50')
Children:
7f7b2ae08d4ef302906c949966fc7a88fe8d895f
Parents:
a5cd69539ad1429c09a8881386628bbf8d1fc2fc
git-author:
Martin Lee <mlee@fifi.mathematik.uni-kl.de>2010-08-27 16:48:16+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:55:28+01:00
Message:
assumes and Werrors added, test gives a seg fault
Location:
coeffs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • coeffs/ffields.cc

    ra5cd69 r1b078e  
    2121//unsigned short *nfPlus1Table=NULL; /* the table i=log(z^i) -> log(z^i+1) */
    2222
     23const double sixteenlog2= 11.09035489;
    2324/* the q's from the table 'fftable' */
    2425unsigned short fftable[]={
     
    612613    /*this field is already set*/  return;
    613614  int i=0;
    614   while ((fftable[i]!=c) && (fftable[i]!=0)) i++;
     615 
     616  while ((fftable[i]!=c) && (fftable[i]!=0))
     617    i++;
     618 
    615619  if (fftable[i]==0)
     620  {
     621    Werror("illegal GF-table size: %d", c);
    616622    return;
     623  }
     624
    617625  if (r->m_nfCharQ > 1)
    618626  {
     
    839847  r->has_simple_Alloc=TRUE;
    840848  r->has_simple_Inverse=TRUE;
    841   const int c = pow (p->GFChar, p->GFDegree);
     849
     850  assume (p->GFChar > 0);
     851  assume (p->GFDegree > 0);
     852
     853  if(p->GFChar > (2<<15))
     854  {
     855    Werror("illegal characteristic"); // no exceptions :(((
     856    return;
     857  }
     858
     859  const double check= log ((double) (p->GFChar));
     860
     861  if( (p->GFDegree * check) > sixteenlog2 )
     862  {
     863    Werror("illegal size");
     864    return;
     865  }
     866
     867  int c = pow (p->GFChar, p->GFDegree);
     868
    842869  nfReadTable(c, r);
     870
     871  assume (r -> m_nfCharQ > 0);
     872
    843873  r->ch = r->m_nfCharP;
    844874
  • coeffs/test.cc

    ra5cd69 r1b078e  
    282282
    283283   param.GFChar= 5;
    284    param.GFDegree= 2;
     284   param.GFDegree= 12;
    285285
    286286   param.GFPar_name= (const char*)"q";
Note: See TracChangeset for help on using the changeset viewer.