Changeset 429ea9 in git


Ignore:
Timestamp:
Jul 23, 2002, 3:09:37 PM (22 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'd1d239e9808fca76a9497a01fa91ad4e8db6fba5')
Children:
a6e7d5259f6bf527575d6768fa2ffd0b7bbb02db
Parents:
4f4b845f7661527365a7cfac318f56c326c44293
Message:
*hannes: nGetDenom


git-svn-id: file:///usr/local/Singular/svn/trunk@6213 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • Singular/longalg.cc

    r4f4b84 r429ea9  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: longalg.cc,v 1.67 2002-06-10 15:25:33 Singular Exp $ */
     4/* $Id: longalg.cc,v 1.68 2002-07-23 13:09:35 Singular Exp $ */
    55/*
    66* ABSTRACT:   algebraic numbers
     
    27802780}
    27812781
    2782 number   naGetDenom(number &n)
    2783 {
    2784   naNormalize(n);
     2782number   naGetDenom(number &n, const ring r)
     2783{
     2784  if (r==currRing) naNormalize(n);
    27852785  lnumber x=(lnumber)n;
    27862786  if (x->n!=NULL)
    27872787  {
    2788     lnumber r=(lnumber)omAlloc0Bin(rnumber_bin);
    2789     r->z=napCopy(naGetDenom0(x));
    2790     r->s = 2;
    2791     return (number)r;
    2792   }
    2793   return naInit(1);
     2788    lnumber rr=(lnumber)omAlloc0Bin(rnumber_bin);
     2789    rr->z=nap_Copy(naGetDenom0(x),r);
     2790    rr->s = 2;
     2791    return (number)rr;
     2792  }
     2793  return r->cf->nInit(1);
    27942794}
    27952795
  • Singular/longalg.h

    r4f4b84 r429ea9  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: longalg.h,v 1.31 2002-06-10 15:25:34 Singular Exp $ */
     6/* $Id: longalg.h,v 1.32 2002-07-23 13:09:35 Singular Exp $ */
    77/*
    88* ABSTRACT:   algebraic numbers
     
    131131extern void     (*nacNormalize)(number &a);
    132132extern void napWrite(napoly l);
    133 extern number   naGetDenom(number &n);
     133extern number   naGetDenom(number &n, const ring r);
    134134#endif
    135135
  • Singular/longrat.cc

    r4f4b84 r429ea9  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: longrat.cc,v 1.43 2002-04-30 14:50:08 Singular Exp $ */
     4/* $Id: longrat.cc,v 1.44 2002-07-23 13:09:36 Singular Exp $ */
    55/*
    66* ABSTRACT: computation with long rational numbers (Hubert Grassmann)
     
    13731373* acces to denominator, other 1 for integers
    13741374*/
    1375 number   nlGetDenom(number &n)
     1375number   nlGetDenom(number &n, const ring r)
    13761376{
    13771377  if (!(SR_HDL(n) & SR_INT))
  • Singular/longrat.h

    r4f4b84 r429ea9  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: longrat.h,v 1.28 2002-04-30 14:50:08 Singular Exp $ */
     6/* $Id: longrat.h,v 1.29 2002-07-23 13:09:36 Singular Exp $ */
    77/*
    88* ABSTRACT: computation with long rational numbers
     
    8989int      nlModP(number n, int p);
    9090int      nlSize(number n);
    91 number   nlGetDenom(number &n);
     91number   nlGetDenom(number &n, const ring r);
    9292#ifdef LDEBUG
    9393BOOLEAN  nlDBTest(number a, char *f, int l);
  • Singular/numbers.cc

    r4f4b84 r429ea9  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: numbers.cc,v 1.46 2002-06-10 16:00:45 Singular Exp $ */
     4/* $Id: numbers.cc,v 1.47 2002-07-23 13:09:37 Singular Exp $ */
    55
    66/*
     
    4949char *  (*nRead)(char *s,number *a);
    5050void    (*nPower)(number a, int i, number * result);
    51 number  (*nGetDenom)(number &n);
    5251number  (*nGcd)(number a, number b, ring r);
    5352number  (*nLcm)(number a, number b, ring r);
     
    8382number ndIntMod(number a, number b) { return nInit(0); }
    8483
    85 number ndGetDenom(number &n) { return nInit(1); }
     84number ndGetDenom(number &n, const ring r) { return n_Init(1,r); }
    8685
    8786int    nGetChar() { return nChar; }
     
    165164  nName= r->cf->nName;
    166165  nSize  = r->cf->nSize;
    167   nGetDenom = r->cf->nGetDenom;
    168166  nRePart = r->cf->nRePart;
    169167  nImPart = r->cf->nImPart;
     
    219217  r->cf->nParDeg=ndParDeg;
    220218  r->cf->nSize = ndSize;
    221   r->cf->nGetDenom= ndGetDenom;
     219  r->cf->n_GetDenom= ndGetDenom;
    222220  r->cf->nName =  ndName;
    223221  r->cf->nImPart=ndReturn0;
     
    261259    r->cf->nName       = naName;
    262260    r->cf->nSize       = naSize;
    263     r->cf->nGetDenom   = naGetDenom;
     261    r->cf->n_GetDenom   = naGetDenom;
    264262#ifdef LDEBUG
    265263    //r->cf->nDBTest     = naDBTest;
     
    297295    r->cf->cfSetMap = nlSetMap;
    298296    r->cf->nSize  = nlSize;
    299     r->cf->nGetDenom = nlGetDenom;
     297    r->cf->n_GetDenom = nlGetDenom;
    300298#ifdef LDEBUG
    301299    //r->cf->nDBTest=nlDBTest;
  • Singular/numbers.h

    r4f4b84 r429ea9  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: numbers.h,v 1.28 2002-01-30 14:33:05 Singular Exp $ */
     6/* $Id: numbers.h,v 1.29 2002-07-23 13:09:37 Singular Exp $ */
    77/*
    88* ABSTRACT: interface to coefficient aritmetics
     
    5454               (*nGreaterZero)(number a);
    5555extern void    (*nPower)(number a, int i, number * result);
    56 extern number  (*nGetDenom)(number &n);
    5756extern number (*nGcd)(number a, number b, const ring r);
    5857extern number (*nLcm)(number a, number b, const ring r);
     
    6362#define nTest(a) (1)
    6463#define nDelete(A) (currRing)->cf->cfDelete(A,currRing)
     64#define nGetDenom(N) (currRing->cf->n_GetDenom((N),currRing))
    6565
    6666#define nSetMap(R) (currRing->cf->cfSetMap(R,currRing))
  • Singular/structs.h

    r4f4b84 r429ea9  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: structs.h,v 1.65 2002-06-10 15:25:35 Singular Exp $ */
     6/* $Id: structs.h,v 1.66 2002-07-23 13:09:34 Singular Exp $ */
    77/*
    88* ABSTRACT
     
    247247           (*nGreaterZero)(number a);
    248248   void    (*nPower)(number a, int i, number * result);
    249    number  (*nGetDenom)(number &n);
     249   number  (*n_GetDenom)(number &n, const ring r);
    250250   number  (*nGcd)(number a, number b, const ring r);
    251251   number  (*nLcm)(number a, number b, const ring r);
Note: See TracChangeset for help on using the changeset viewer.