Changeset dd8d5d in git for Singular


Ignore:
Timestamp:
Jul 12, 2010, 7:17:33 PM (14 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
c33f4e1e651e9c7348e3ee67fe6bc7e975dbbe6f
Parents:
29d1bf21200e88af831c550f2dce8fb241b8b95e
Message:
primefactor(number)

git-svn-id: file:///usr/local/Singular/svn/trunk@12985 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r29d1bf rdd8d5d  
    31883188  int bound = (int)(long)v->Data();
    31893189  number n;
    3190   if (u->Typ() == BIGINT_CMD) n = m;
     3190  if ((u->Typ() == BIGINT_CMD)
     3191  || ((u->Typ()==NUMBER_CMD) && rField_is_Q()))
     3192  {
     3193    n = nlCopy(m);
     3194  }
    31913195  else
    31923196  {
     
    31973201  }
    31983202  lists l = primeFactorisation(n, bound);
     3203  nlDelete(&n,NULL);
    31993204  res->data=(char*)l;
    32003205  return FALSE;
     
    44644469static BOOLEAN jjPFAC1(leftv res, leftv v)
    44654470{
    4466   number m = (number)v->Data();
    4467   number n;
    4468   if (v->Typ() == BIGINT_CMD) n = m;
    4469   else
    4470   {
    4471     /* then, we expect some other type of number inside m;
    4472        it needs to be converted to bigint; we do this via 'int' */
    4473     int i = n_Int(m, currRing);
    4474     n = nlInit(i, NULL);
    4475   }
    4476   lists l = primeFactorisation(n, 0);
    4477   res->data=(char*)l;
    4478   return FALSE;
     4471  sleftv tmp;
     4472  memset(&tmp,0,sizeof(tmp));
     4473  tmp.rtyp=INT_CMD;
     4474  return jjPFAC2(res,v,&tmp);
    44794475}
    44804476static BOOLEAN jjLU_DECOMP(leftv res, leftv v)
Note: See TracChangeset for help on using the changeset viewer.