Changeset 70bf04b in git
 Timestamp:
 Mar 21, 2013, 11:39:03 AM (10 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '5a0dde71de01068fad5736a17555c993ecbbf495')
 Children:
 675c62cd9015e53f77b1f57146d0d5098bcb42e1
 Parents:
 2d35fe77fb45655052d739f5e90e572b52fe709f
 gitauthor:
 Martin Lee <martinlee84@web.de>20130321 11:39:03+01:00
 gitcommitter:
 Martin Lee <martinlee84@web.de>20130322 15:53:43+01:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/facHensel.cc
r2d35fe r70bf04b 7 7 * 8 8 * ABSTRACT: Hensel lifting is described in "Efficient Multivariate 9 * Factorization over Finite Fields" by L. Bernardin & M. Monagon. Division with 10 * remainder is described in "Fast Recursive Division" by C. Burnikel and 11 * J. Ziegler. Karatsuba multiplication is described in "Modern Computer 12 * Algebra" by J. von zur Gathen and J. Gerhard. 9 * Factorization over Finite Fields" by L. Bernardin & M. Monagon. 13 10 * 14 11 * @author Martin Lee … … 1758 1755 M (j + 2, 1)= mulNTL (bufFactors[0] [j + 1], bufFactors[1] [j + 1]); 1759 1756 } 1757 else 1758 M (j + 1, 1)= 0; 1759 1760 1760 CanonicalForm uIZeroJ; 1761 1761 if (degBuf0 > 0 && degBuf1 > 0) 1762 uIZeroJ= mulNTL(bufFactors[0][0],buf[1])+mulNTL (bufFactors[1][0], buf[0]); 1762 uIZeroJ= mulNTL(bufFactors[0][0], buf[1]) + 1763 mulNTL (bufFactors[1][0], buf[0]); 1763 1764 else if (degBuf0 > 0) 1764 uIZeroJ= mulNTL (buf[0], bufFactors[1]); 1765 uIZeroJ= mulNTL (buf[0], bufFactors[1]) + 1766 mulNTL (buf[1], bufFactors[0][0]); 1765 1767 else if (degBuf1 > 0) 1766 uIZeroJ= mulNTL (bufFactors[0], buf [1]); 1768 uIZeroJ= mulNTL (bufFactors[0], buf[1]) + 1769 mulNTL (buf[0], bufFactors[1][0]); 1767 1770 else 1768 uIZeroJ= 0; 1771 uIZeroJ= mulNTL (bufFactors[0], buf[1]) + 1772 mulNTL (buf[0], bufFactors[1]); 1773 1769 1774 Pi [0] += xToJ*uIZeroJ; 1770 1775 … … 1781 1786 for (k= 1; k <= (int) ceil (j/2.0); k++) 1782 1787 { 1783 if (one.hasTerms() && two.hasTerms()) 1784 { 1785 if (k != j  k + 1) 1786 { 1787 if ((one.hasTerms() && one.exp() == j  k + 1) && + 1788 (two.hasTerms() && two.exp() == j  k + 1)) 1788 if (k != j  k + 1) 1789 { 1790 if ((one.hasTerms() && one.exp() == j  k + 1) && + 1791 (two.hasTerms() && two.exp() == j  k + 1)) 1789 1792 { 1790 1793 tmp[0] += mulNTL ((bufFactors[0][k]+one.coeff()),(bufFactors[1][k] + 1791 1794 two.coeff()))  M (k + 1, 1)  M (j  k + 2, 1); 1792 1795 one++; 1793 1796 two++; … … 1796 1799 { 1797 1800 tmp[0] += mulNTL ((bufFactors[0][k]+one.coeff()), bufFactors[1] [k])  1798 1801 M (k + 1, 1); 1799 1802 one++; 1800 1803 } … … 1808 1811 else 1809 1812 tmp[0] += M (k + 1, 1); 1810 }1811 1813 } 1812 1814 } … … 1847 1849 M (j + 2, l + 1)= mulNTL (Pi [l  1][j + 1], bufFactors[l + 1] [j + 1]); 1848 1850 } 1851 else 1852 M (j + 1, l + 1)= 0; 1849 1853 1850 1854 if (degPi > 0 && degBuf > 0) 1851 uIZeroJ= mulNTL (Pi[l  1] [0], buf[l + 1]) +1855 uIZeroJ= mulNTL (Pi[l  1] [0], buf[l + 1]) + 1852 1856 mulNTL (uIZeroJ, bufFactors[l+1] [0]); 1853 1857 else if (degPi > 0) 1854 uIZeroJ= mulNTL (uIZeroJ, bufFactors[l + 1]); 1858 uIZeroJ= mulNTL (uIZeroJ, bufFactors[l + 1]) + 1859 mulNTL (Pi[l  1][0], buf[l + 1]); 1855 1860 else if (degBuf > 0) 1856 uIZeroJ= mulNTL (Pi[l  1], buf[l+1]); 1857 else 1858 uIZeroJ= 0; 1861 uIZeroJ= mulNTL (uIZeroJ, bufFactors[l + 1][0]) + 1862 mulNTL (Pi[l  1], buf[l + 1]); 1863 else 1864 uIZeroJ= mulNTL (uIZeroJ, bufFactors[l + 1]) + 1865 mulNTL (Pi[l  1], buf[l + 1]); 1859 1866 1860 1867 Pi [l] += xToJ*uIZeroJ;
Note: See TracChangeset
for help on using the changeset viewer.