UnivariatePolynomialMultiplicationPackage(R, U)¶
poly.spad line 1314 [edit on github]
- R: Ring 
This package implements Karatsuba's trick for multiplying (large) univariate polynomials. It could be improved with a version doing the work on place and also with a special case for squares. We’ve done this in Basicmath, but we believe that this out of the scope of FriCAS.
- karatsuba: (U, U, NonNegativeInteger, NonNegativeInteger) -> U
- karatsuba(a, b, l, k)returns- a*bby applying Karatsuba- 'strick provided that both- aand- bhave at least- lterms and- k > 0holds and by calling- noKaratsubaotherwise. The other multiplications are performed by recursive calls with the same third argument and- k-1as fourth argument.
- karatsubaOnce: (U, U) -> U
- karatsuba(a, b)returns- a*bby applying Karatsuba- 'strick once. The other multiplications are performed by calling- *from- U.
- noKaratsuba: (U, U) -> U
- noKaratsuba(a, b)returns- a*bwithout using Karatsuba- 'strick at all.