Changeset 3216ec in git for Singular/iparith.cc


Ignore:
Timestamp:
Aug 15, 2012, 1:44:30 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
Children:
d8b0997ff6f148513d95e2f2a5a075c7386c7168
Parents:
a8ead8e63f3539f8915726efa18791dcc052733a
Message:
add: extgcd for bigint
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    ra8ead8 r3216ec  
    19741974  inerror=3;
    19751975  return TRUE;
     1976}
     1977static BOOLEAN jjEXTGCD_BI(leftv res, leftv u, leftv v)
     1978{
     1979  number uu=(number)u->Data();number vv=(number)v->Data();
     1980  lists L=(lists)omAllocBin(slists_bin);
     1981  number a,b;
     1982  number p0=n_ExtGcd(uu,vv,&a,&b,coeffs_BIGINT);
     1983  L->Init(3);
     1984  L->m[0].rtyp=BIGINT_CMD;   L->m[0].data=(void *)p0;
     1985  L->m[1].rtyp=BIGINT_CMD;   L->m[1].data=(void *)a;
     1986  L->m[2].rtyp=BIGINT_CMD;   L->m[2].data=(void *)b;
     1987  res->rtyp=LIST_CMD;
     1988  res->data=(char *)L;
     1989  return FALSE;
    19761990}
    19771991static BOOLEAN jjEXTGCD_I(leftv res, leftv u, leftv v)
Note: See TracChangeset for help on using the changeset viewer.