Changeset 893148 in git
 Timestamp:
 Aug 6, 2009, 6:35:56 PM (14 years ago)
 Branches:
 (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
 Children:
 e475e396109e19d042fc2e09fea0ec817a2ef69b
 Parents:
 e4b56dbdc5ea987694f17044905f9c68071a59eb
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

kernel/longalg.cc
re4b56d r893148 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: longalg.cc,v 1.4 1 20090806 14:36:51Singular Exp $ */4 /* $Id: longalg.cc,v 1.42 20090806 16:35:56 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: algebraic numbers … … 308 308 nacNormalize(t); 309 309 t = nacNeg(t); 310 qa=p_Mult_nn(qa,t,nacRing); 310 qa=p_Mult_nn(qa,t,nacRing); p_Normalize(qa,nacRing); 311 311 nacDelete(&t,nacRing); 312 312 napNormalize(qa); … … 328 328 nacNormalize(napGetCoeff(r)); 329 329 t = nacInvers(napGetCoeff(r)); 330 q=p_Mult_nn(q,t,nacRing); 330 q=p_Mult_nn(q,t,nacRing); p_Normalize(q,nacRing); 331 331 napNormalize(q); 332 332 nacDelete(&t,nacRing); … … 357 357 t = nacInvers(napGetCoeff(r)); 358 358 //nacNormalize(t); 359 q=p_Mult_nn(q,t,nacRing); 359 q=p_Mult_nn(q,t,nacRing); p_Normalize(q,nacRing); 360 360 napNormalize(q); 361 361 nacDelete(&t,nacRing); … … 651 651 { 652 652 p = ph; 653 while (p!=NULL) 654 { 655 d=nacMult(h, napGetCoeff(p)); 656 nacDelete(&napGetCoeff(p),nacRing); 657 nacNormalize(d); 658 napGetCoeff(p) = d; 659 napIter(p); 660 } 653 p=p_Mult_nn(p,h,nacRing);p_Normalize(p,nacRing); 661 654 nacDelete(&h,nacRing); 662 655 } … … 746 739 napCleardenom(y); 747 740 if (!nacIsOne(napGetCoeff(g))) 741 { 748 742 y=p_Mult_nn(y,napGetCoeff(g),nacRing); 743 p_Normalize(y,nacRing); 744 } 749 745 napDelete1(&g); 750 746 return y; … … 1763 1759 /* collect all denoms from y and multiply x and y by it */ 1764 1760 number n=napLcm(y); 1765 x=p_Mult_nn(x,n,nacRing); 1766 y=p_Mult_nn(y,n,nacRing); 1761 x=p_Mult_nn(x,n,nacRing);p_Normalize(x,nacRing); 1762 y=p_Mult_nn(y,n,nacRing);p_Normalize(y,nacRing); 1767 1763 nacDelete(&n,nacRing); 1768 1764 while(x!=NULL) … … 1813 1809 number h1 = nacInvers(napGetCoeff(y)); 1814 1810 nacNormalize(h1); 1815 x=p_Mult_nn(x,h1,nacRing); 1811 x=p_Mult_nn(x,h1,nacRing);p_Normalize(x,nacRing); 1816 1812 nacDelete(&h1,nacRing); 1817 1813 napDelete1(&y); … … 1858 1854 { 1859 1855 number n=napLcm(y); 1860 x=p_Mult_nn(x,n,nacRing); 1861 y=p_Mult_nn(y,n,nacRing); 1856 x=p_Mult_nn(x,n,nacRing);p_Normalize(x,nacRing); 1857 y=p_Mult_nn(y,n,nacRing);p_Normalize(y,nacRing); 1862 1858 nacDelete(&n,nacRing); 1863 1859 while(x!=NULL) … … 2047 2043 number aa=nacInvers(a); 2048 2044 nacDelete(&a,nacRing); 2049 x=p_Mult_nn(x,aa,nacRing); 2045 x=p_Mult_nn(x,aa,nacRing);p_Normalize(x,nacRing); 2050 2046 nacDelete(&aa,nacRing); 2051 2047 }
Note: See TracChangeset
for help on using the changeset viewer.