Changeset 980f81 in git


Ignore:
Timestamp:
Aug 24, 2001, 4:10:09 PM (22 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
7a7499d2766dbca4b77d47c2cc7f4f8b23e4b382
Parents:
47c8f1203dc6663433e108e9e01f128d3ca726e3
Message:
*hannes: back numbers.cc longrat.cc longrat.h


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

Legend:

Unmodified
Added
Removed
  • Singular/longrat.cc

    r47c8f1 r980f81  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: longrat.cc,v 1.39 2001-08-24 13:41:35 Singular Exp $ */
     4/* $Id: longrat.cc,v 1.40 2001-08-24 14:09:06 Singular Exp $ */
    55/*
    66* ABSTRACT: computation with long rational numbers (Hubert Grassmann)
     
    109109
    110110omBin rnumber_bin = omGetSpecBin(sizeof(rnumber));
    111 
    112 number nlOne=nlInit(1);
    113111
    114112static int nlPrimeM;
     
    510508}
    511509
    512 
    513 
    514510/*
    515511* 1/a
     
    22012197}
    22022198
    2203 /*2
    2204 * z := i/j
    2205 */
    2206 number nlInit2 (int i, int j)
    2207 {
    2208   number z=(number)omAllocBin(rnumber_bin);
    2209 #if defined(LDEBUG)
    2210   z->debug=123456;
    2211 #endif
    2212   mpz_init_set_si(&z->z,(long)i);
    2213   mpz_init_set_si(&z->n,(long)j);
    2214   z->s = 0;
    2215   nlNormalize(z);
    2216   return z;
    2217 }
    2218 
    22192199#else // DO_LINLINE
    22202200
     
    22992279}
    23002280
     2281LINLINE number nl_Copy(number a, ring r)
     2282{
     2283  if ((SR_HDL(a) & SR_INT)||(a==NULL))
     2284  {
     2285    return a;
     2286  }
     2287  return _nlCopy_NoImm(a);
     2288}
     2289
    23012290
    23022291LINLINE void nlNew (number * r)
  • Singular/longrat.h

    r47c8f1 r980f81  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: longrat.h,v 1.24 2001-08-24 13:54:03 Singular Exp $ */
     6/* $Id: longrat.h,v 1.25 2001-08-24 14:10:09 Singular Exp $ */
    77/*
    88* ABSTRACT: computation with long rational numbers
     
    4141struct snumber;
    4242typedef struct snumber rnumber;
    43 typedef rnumber * number;
    4443struct snumber
    4544{
     
    6665LINLINE BOOLEAN  nlIsZero(number za);
    6766LINLINE number   nlCopy(number a);
     67LINLINE number   nl_Copy(number a, ring r);
    6868LINLINE void     nlNew(number *r);
    6969LINLINE void     nlDelete(number *a, const ring r);
     
    7373LINLINE number   nlMult(number a, number b);
    7474
    75 number   nlInit2 (int i, int j);
    7675number   nlGcd(number a, number b, const ring r);
    7776number   nlLcm(number a, number b, const ring r);   /*special routine !*/
     
    9695BOOLEAN  nlDBTest(number a, char *f, int l);
    9796#endif
    98 extern number nlOne;
    9997
    10098nMapFunc nlSetMap(ring src, ring dst);
  • Singular/numbers.cc

    r47c8f1 r980f81  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: numbers.cc,v 1.42 2001-08-24 13:54:03 Singular Exp $ */
     4/* $Id: numbers.cc,v 1.43 2001-08-24 14:10:09 Singular Exp $ */
    55
    66/*
     
    9090
    9191number ndCopy(number a) { return a; }
     92number nd_Copy(number a, ring r) { return a; }
    9293
    9394/*2
     
    223224  r->cf->cfDelete= ndDelete;
    224225  r->cf->nNew=nDummy1;
     226  r->cf->nCopy  = ndCopy;
     227  r->cf->cfCopy  = nd_Copy;
    225228  if (rField_is_Extension(r))
    226229  {
     
    243246    r->cf->nInvers     = naInvers;
    244247    r->cf->nCopy       = naCopy;
     248    r->cf->cfCopy      = na_Copy;
    245249    r->cf->nGreater    = naGreater;
    246250    r->cf->nEqual      = naEqual;
     
    279283    r->cf->nInvers= nlInvers;
    280284    r->cf->nCopy  = nlCopy;
     285    r->cf->cfCopy  = nl_Copy;
    281286    r->cf->nGreater = nlGreater;
    282287    r->cf->nEqual = nlEqual;
     
    313318    r->cf->nNeg   = npNeg;
    314319    r->cf->nInvers= npInvers;
    315     r->cf->nCopy  = ndCopy;
    316320    r->cf->nGreater = npGreater;
    317321    r->cf->nEqual = npEqual;
     
    350354    r->cf->nNeg   = nfNeg;
    351355    r->cf->nInvers= nfInvers;
    352     r->cf->nCopy  = ndCopy;
    353356    r->cf->nGreater = nfGreater;
    354357    r->cf->nEqual = nfEqual;
     
    385388    r->cf->nNeg   = nrNeg;
    386389    r->cf->nInvers= nrInvers;
    387     r->cf->nCopy  = ndCopy;
    388390    r->cf->nGreater = nrGreater;
    389391    r->cf->nEqual = nrEqual;
     
    422424    r->cf->nInvers= ngfInvers;
    423425    r->cf->nCopy  = ngfCopy;
     426    r->cf->cfCopy  = ngf_Copy;
    424427    r->cf->nGreater = ngfGreater;
    425428    r->cf->nEqual = ngfEqual;
     
    458461    r->cf->nInvers= ngcInvers;
    459462    r->cf->nCopy  = ngcCopy;
     463    r->cf->cfCopy = ngc_Copy;
    460464    r->cf->nGreater = ngcGreater;
    461465    r->cf->nEqual = ngcEqual;
Note: See TracChangeset for help on using the changeset viewer.