Changeset ca5f5ec in git for libpolys


Ignore:
Timestamp:
Feb 24, 2016, 4:38:10 PM (8 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
687bb23a84a85e15ae9f061e66026f6178e92a83
Parents:
7d73a532007715a4f89189b31ac860fe961b9bd580f8f6cd42a3bd43241967f63a3004b77db6d11b
Message:
Merge pull request #749 from jgmbenoit/debian/4.0.3+ds-1/lintian/spelling

correct spelling errors as detected by Lintian
Location:
libpolys
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/bigintmat.h

    r7d73a53 rca5f5ec  
    273273    void extendCols (int i);
    274274
    275     bool add(bigintmat *b); ///< Addiert zur Matrix die Matrix b dazu. Return false => an error occured
     275    bool add(bigintmat *b); ///< Addiert zur Matrix die Matrix b dazu. Return false => an error occurred
    276276    bool sub(bigintmat *b); ///< Subtrahiert ...
    277277    bool skalmult(number b, coeffs c); ///< Multipliziert zur Matrix den Skalar b hinzu
  • libpolys/coeffs/coeffs.h

    r80f8f6c rca5f5ec  
    613613/// raises an error if 'b' is not invertible in r
    614614/// exception in Z: raises an error if 'a' is not divisible by 'b'
     615/// always: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a
    615616static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
    616617{ STATISTIC(n_Div); assume(r != NULL); assume(r->cfDiv!=NULL); return r->cfDiv(a,b,r); }
     
    624625
    625626/// for r a field, return n_Init(0,r)
    626 /// otherwise: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a
     627/// always: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a
     628/// n_IntMod(a,b,r) >=0
    627629static FORCE_INLINE number n_IntMod(number a, number b, const coeffs r)
    628630{ STATISTIC(n_IntMod); assume(r != NULL); return r->cfIntMod(a,b,r); }
  • libpolys/coeffs/longrat.cc

    r80f8f6c rca5f5ec  
    160160#define mpz_limb_size(A) ((A)->_mp_size)
    161161#define mpz_limb_d(A) ((A)->_mp_d)
    162 #define MPZ_DIV(A,B,C) mpz_tdiv_q((A),(B),(C))
    163 #define MPZ_EXACTDIV(A,B,C) mpz_divexact((A),(B),(C))
    164162
    165163void    _nlDelete_NoImm(number *a);
     
    624622  long ul;
    625623  mpz_init(tmp);
    626   MPZ_DIV(tmp,i->z,i->n);
     624  mpz_tdiv_q(tmp,i->z,i->n);
    627625  if(mpz_size1(tmp)>MP_SMALL) ul=0;
    628626  else
     
    648646  }
    649647  number tmp=nlRInit(1);
    650   MPZ_DIV(tmp->z,i->z,i->n);
     648  mpz_tdiv_q(tmp->z,i->z,i->n);
    651649  tmp=nlShort3(tmp);
    652650  return tmp;
     
    769767  /* u=a/b */
    770768  u->s = 3;
    771   MPZ_EXACTDIV(u->z,a->z,b->z);
     769  mpz_divexact(u->z,a->z,b->z);
    772770  if (bb!=NULL)
    773771  {
     
    803801      return nlRInit(POW_2_28);
    804802    }
    805     long aa=SR_TO_INT(a);
    806     long bb=SR_TO_INT(b);
    807     return INT_TO_SR(aa/bb);
    808   }
     803    LONG aa=SR_TO_INT(a);
     804    LONG bb=SR_TO_INT(b);
     805    LONG rr=aa%bb;
     806    if (rr<0) rr+=ABS(bb);
     807    LONG cc=(aa-rr)/bb;
     808    return INT_TO_SR(cc);
     809  }
     810  number aa=NULL;
    809811  if (SR_HDL(a) & SR_INT)
    810812  {
     
    817819      }
    818820    }
    819     /* a is a small and b is a large int: -> 0 */
    820     return INT_TO_SR(0);
     821    aa=nlRInit(SR_TO_INT(a));
     822    a=aa;
    821823  }
    822824  number bb=NULL;
     
    835837  /* u=u/b */
    836838  u->s = 3;
    837   MPZ_DIV(u->z,u->z,b->z);
     839  number rr=nlIntMod(a,b,r);
     840  if (SR_HDL(rr) &  SR_INT) mpz_sub_ui(u->z,u->z,SR_TO_INT(rr));
     841  else                      mpz_sub(u->z,u->z,rr->z);
     842  mpz_divexact(u->z,u->z,b->z);
     843  if (aa!=NULL)
     844  {
     845    mpz_clear(aa->z);
     846#if defined(LDEBUG)
     847    aa->debug=654324;
     848#endif
     849    FREE_RNUMBER(aa);
     850  }
    838851  if (bb!=NULL)
    839852  {
     
    864877  if (SR_HDL(a) & SR_HDL(b) & SR_INT)
    865878  {
     879    LONG aa=SR_TO_INT(a);
    866880    LONG bb=SR_TO_INT(b);
    867     LONG c=SR_TO_INT(a) % bb;
     881    LONG c=aa % bb;
     882    if (c<0) c+=ABS(bb);
    868883    return INT_TO_SR(c);
    869884  }
    870885  if (SR_HDL(a) & SR_INT)
    871886  {
     887    LONG ai=SR_TO_INT(a);
    872888    mpz_t aa;
    873     mpz_init(aa);
    874     mpz_set_si(aa, SR_TO_INT(a));
     889    mpz_init_set_si(aa, ai);
    875890    u=ALLOC_RNUMBER();
    876891#if defined(LDEBUG)
     
    879894    u->s = 3;
    880895    mpz_init(u->z);
    881     mpz_t q;
    882     mpz_init(q);
    883     mpz_tdiv_qr(q,u->z, aa, b->z);
    884     mpz_clear(q);
     896    mpz_mod(u->z, aa, b->z);
    885897    mpz_clear(aa);
    886898    u=nlShort3(u);
     
    900912  mpz_init(u->z);
    901913  u->s = 3;
    902   mpz_t q;
    903   mpz_init(q);
    904   mpz_tdiv_qr(q, u->z, a->z, b->z);
    905   mpz_clear(q);
     914  mpz_mod(u->z, a->z, b->z);
    906915  if (bb!=NULL)
    907916  {
     
    13491358      if (mpz_cmp_si(gcd,(long)1)!=0)
    13501359      {
    1351         MPZ_EXACTDIV(x->z,x->z,gcd);
    1352         MPZ_EXACTDIV(x->n,x->n,gcd);
     1360        mpz_divexact(x->z,x->z,gcd);
     1361        mpz_divexact(x->n,x->n,gcd);
    13531362        if (mpz_cmp_si(x->n,(long)1)==0)
    13541363        {
     
    13941403    mpz_t bt;
    13951404    mpz_init_set(bt,b->n);
    1396     MPZ_EXACTDIV(bt,bt,gcd);
     1405    mpz_divexact(bt,bt,gcd);
    13971406    if (SR_HDL(a) & SR_INT)
    13981407      mpz_mul_si(result->z,bt,SR_TO_INT(a));
     
    16461655  if (mpz_cmp_si(gcd,(long)1)!=0)
    16471656  {
    1648     MPZ_EXACTDIV(x->z,x->z,gcd);
    1649     MPZ_EXACTDIV(x->n,x->n,gcd);
     1657    mpz_divexact(x->z,x->z,gcd);
     1658    mpz_divexact(x->n,x->n,gcd);
    16501659    if (mpz_cmp_si(x->n,(long)1)==0)
    16511660    {
     
    28032812  else
    28042813  {
    2805     if (mpz_isNeg(a->z))
    2806     {
    2807       if (mpz_isNeg(b->z))
    2808       {
    2809         mpz_add(a->z,a->z,b->z);
    2810       }
    2811       else
    2812       {
    2813         mpz_sub(a->z,a->z,b->z);
    2814       }
    2815       mpz_add_ui(a->z,a->z,1);
    2816     }
    2817     else
    2818     {
    2819       if (mpz_isNeg(b->z))
    2820       {
    2821         mpz_sub(a->z,a->z,b->z);
    2822       }
    2823       else
    2824       {
    2825         mpz_add(a->z,a->z,b->z);
    2826       }
    2827       mpz_sub_ui(a->z,a->z,1);
    2828     }
    2829     MPZ_DIV(a->z,a->z,b->z);
     2814    number rr=nlIntMod(a,b,r);
     2815    if (SR_HDL(rr) &  SR_INT) mpz_sub_ui(a->z,a->z,SR_TO_INT(rr));
     2816    else                      mpz_sub(a->z,a->z,rr->z);
     2817    mpz_divexact(a->z,a->z,b->z);
    28302818    a=nlShort3_noinline(a);
    28312819  }
  • libpolys/misc/auxiliary.h.in

    r7d73a53 rca5f5ec  
    221221       makes sure that all poly operations in your file are done with
    222222       PDEBUG == 2
    223  To break after an error occured, set a debugger breakpoint on
     223 To break after an error occurred, set a debugger breakpoint on
    224224 dErrorBreak.
    225225*/
     
    285285   Some tips on possible values of OM_TRACK, OM_CHECK, OM_KEEP:
    286286   + To find out about an address that has been freed twice, first locate the
    287      file(s) where the error occured, and then at the beginning of these files:
     287     file(s) where the error occurred, and then at the beginning of these files:
    288288       #define OM_CHECK 3
    289289       #define OM_TRACK 5
     
    293293     Under dynamic scope, do (e.g., from within the debugger):
    294294       om_Opts.MinCheck = 3; om_Opts.MinTrack = 5; omOpts.Keep = LONG_MAX;
    295    + to find out where "memory corruption" occured, increase value of
     295   + to find out where "memory corruption" occurred, increase value of
    296296     OM_CHECK - the higher this value is, the more consistency checks are
    297297     done (However a value > 3 checks the entire memory each time an omalloc
     
    315315     defined, then the "real" alloc/realloc/free macros are used, and all
    316316     omTest, omDebug and omCheck routines are undefined
    317    + to break after an omError occured within a debugger,
     317   + to break after an omError occurred within a debugger,
    318318     set a breakpoint on dErrorBreak
    319319   + to do checks from within the debugger, or to do checks with explicit
  • libpolys/polys/nc/old.gring.cc

    r7d73a53 rca5f5ec  
    30903090  if (nc_CallPlural(r->GetNC()->C, r->GetNC()->D, NULL, NULL, res, bSetupQuotient, true, true, r))
    30913091  {
    3092     WarnS("Error occured while coping/setuping the NC structure!"); // No reaction!???
     3092    WarnS("Error occurred while coping/setuping the NC structure!"); // No reaction!???
    30933093    return true; // error
    30943094  }
  • libpolys/polys/pDebug.cc

    r7d73a53 rca5f5ec  
    5151  fprintf(stderr, "\n// ***dPolyReportError: ");
    5252  vfprintf(stderr, fmt, ap);
    53   fprintf(stderr, "\n occured at\n");
     53  fprintf(stderr, "\n occurred at\n");
    5454  omPrintCurrentBackTraceMax(stderr, 8);
    5555  if (p != NULL)
    5656  {
    57     fprintf(stderr, " occured for poly: ");
     57    fprintf(stderr, " occurred for poly: ");
    5858    p_wrp(p, r);
    5959    omPrintAddrInfo(stderr, p, " ");
  • libpolys/reporter/dError.cc

    r7d73a53 rca5f5ec  
    5959#if !defined(OM_NDEBUG)
    6060  #ifdef omPrintCurrentBackTraceMax
    61   fprintf(stderr, " occured at: \n");
     61  fprintf(stderr, " occurred at: \n");
    6262  omPrintCurrentBackTraceMax(stderr, 8);
    6363  #endif
  • libpolys/reporter/reporter.h

    r7d73a53 rca5f5ec  
    109109extern int dReportError(const char* fmt, ...);
    110110#define dReportBug(s) \
    111   dReportError("Bug reported: %s\n occured at %s,%d\n", s, __FILE__, __LINE__)
     111  dReportError("Bug reported: %s\n occurred at %s,%d\n", s, __FILE__, __LINE__)
    112112
    113113// this is just a dummy procedure which is called after the error
Note: See TracChangeset for help on using the changeset viewer.