Changeset 967a9d in git


Ignore:
Timestamp:
Oct 8, 2009, 12:06:59 PM (14 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
e2afcedc88f05c860f7b86aa70958e538eb8727f
Parents:
aaeb98f1d8fde2cb5e6c22ea2a7379cb757bf46c
Message:
*hannes: p_GetAllDenom


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

Legend:

Unmodified
Added
Removed
  • kernel/polys.h

    raaeb98 r967a9d  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: polys.h,v 1.21 2009-02-26 14:22:49 Singular Exp $ */
     6/* $Id: polys.h,v 1.22 2009-10-08 10:06:59 Singular Exp $ */
    77/*
    88* ABSTRACT - all basic methods to manipulate polynomials of the
     
    367367void      pCleardenom_n(poly p,number &c);
    368368void      p_Normalize(poly p,const ring r);
     369number    p_GetAllDenom(poly ph, const ring r);
    369370#define   pNormalize(p) p_Normalize(p,currRing)
    370371int       pSize( poly p );
  • kernel/polys1.cc

    raaeb98 r967a9d  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: polys1.cc,v 1.41 2009-09-24 16:37:42 Singular Exp $ */
     4/* $Id: polys1.cc,v 1.42 2009-10-08 10:06:59 Singular Exp $ */
    55
    66/*
     
    11621162}
    11631163
     1164number p_GetAllDenom(poly ph, const ring r)
     1165{
     1166  number d=n_Init(1,r);
     1167  poly p = ph;
     1168
     1169  while (p!=NULL)
     1170  {
     1171    number h=n_GetDenom(pGetCoeff(p),r);
     1172    if (!n_IsOne(h,r))
     1173    {
     1174      number dd=n_Mult(d,h,r);
     1175      n_Delete(&d,r);
     1176      d=dd;
     1177    }
     1178    n_Delete(&h,r);
     1179    pIter(p);
     1180  }
     1181  return d;
     1182}
     1183
    11641184/*2
    11651185*tests if p is homogeneous with respect to the actual weigths
Note: See TracChangeset for help on using the changeset viewer.