- Timestamp:
- Sep 29, 2011, 2:59:11 PM (13 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 09c65dc1c677f39d71809535df717f92fa2c03b3
- Parents:
- 61a05011eb6c7b5ce19f060abf2ce176727b964e
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-09-29 14:59:11+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:13:48+01:00
- Location:
- libpolys/polys/monomials
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/monomials/p_polys.cc
r61a050 r90aec7 1482 1482 is well-defined; 1483 1483 modifies p */ 1484 void p_Monic(poly &p,ring r)1484 void p_Monic(poly p, const ring r) 1485 1485 { 1486 1486 if (p == NULL) return; 1487 number n = n_Init(1, r->cf); 1488 if (p->next==NULL) { p_SetCoeff(p,n,r); return; } 1487 1489 poly pp = p; 1488 1490 number lc = p_GetCoeff(p, r); 1489 1491 if (n_IsOne(lc, r->cf)) return; 1490 1492 number lcInverse = n_Invers(lc, r->cf); 1491 number n = n_Init(1, r->cf);1492 1493 p_SetCoeff(p, n, r); // destroys old leading coefficient! 1493 p = pIter(p);1494 pIter(p); 1494 1495 while (p != NULL) 1495 1496 { 1496 1497 number n = n_Mult(p_GetCoeff(p, r), lcInverse, r->cf); 1498 n_Normalize(n,r->cf); 1497 1499 p_SetCoeff(p, n, r); // destroys old leading coefficient! 1498 1500 p = pIter(p); … … 2072 2074 pIter(c_n); 2073 2075 } 2076 pIter(p); 2074 2077 } 2075 pIter(p);2076 2078 /* hzz contains the 1/lcm of all denominators in c_n_n*/ 2077 2079 h=n_Invers(hzz,r->cf->extRing->cf); -
libpolys/polys/monomials/p_polys.h
r61a050 r90aec7 1855 1855 is well-defined; 1856 1856 modifies p */ 1857 void p_Monic(poly &p,ring r);1857 void p_Monic(poly p, const ring r); 1858 1858 1859 1859 /* assumes that p and q are univariate polynomials in r,
Note: See TracChangeset
for help on using the changeset viewer.