úÎ!Ú‡Òƒm      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl(c) 2019 Andrew LelechenkoBSD3/Andrew Lelechenko <andrew.lelechenko@gmail.com>None %=?HMVXg"qpoly&Polynomials backed by unboxed vectors.poly$Polynomials backed by boxed vectors.poly3Polynomials of one variable with coefficients from a, backed by a m v" (boxed, unboxed, storable, etc.). Use pattern  for construction:"(X + 1) + (X - 1) :: VPoly Integer 2 * X + 0(X + 1) * (X - 1) :: UPoly Int1 * X^2 + 0 * X + (-1)NPolynomials are stored normalized, without leading zero coefficients, so 0 *  + 1 equals to 1.nW instance does not make much sense mathematically, it is defined only for the sake of   ,   , etc.polyConvert M to a vector of coefficients (first element corresponds to a constant term).opolyCreate an identity polynomial.polyCreate an identity polynomial.polyMake M from a list of coefficients (first element corresponds to a constant term).:set -XOverloadedListstoPoly [1,2,3] :: VPoly Integer3 * X^2 + 2 * X + 1toPoly [0,0,0] :: UPoly Int0poly@Return a leading power and coefficient of a non-zero polynomial.2leading ((2 * X + 1) * (2 * X^2 - 1) :: UPoly Int) Just (3,4)leading (0 :: UPoly Int)Nothingpoly1Create a monomial from a power and a coefficient.polyLMultiply a polynomial by a monomial, expressed as a power and a coefficient. scale 2 3 (X^2 + 1) :: UPoly Int'3 * X^4 + 0 * X^3 + 3 * X^2 + 0 * X + 0 polyEvaluate at a given point.eval (X^2 + 1 :: UPoly Int) 310 poly)Substitute another polynomial instead of .1subst (X^2 + 1 :: UPoly Int) (X + 1 :: UPoly Int)1 * X^2 + 2 * X + 2 polyTake a derivative. deriv (X^3 + 3 * X) :: UPoly Int3 * X^2 + 0 * X + 3 polyOCompute an indefinite integral of a polynomial, setting constant term to zero.&integral (3 * X^2 + 3) :: UPoly Double%1.0 * X^3 + 0.0 * X^2 + 3.0 * X + 0.0ppoly Note that q = r and s = t 1.uovwxyz { |} ~ €1 (c) 2019 Andrew LelechenkoBSD3/Andrew Lelechenko <andrew.lelechenko@gmail.com>None =?HVXg&\polyConsider using ; wrapper, which provides a much faster implementation of ‚ for polynomials over ƒ.(c) 2019 Andrew LelechenkoBSD3/Andrew Lelechenko <andrew.lelechenko@gmail.com>None ,=?HVXg(„(c) 2019 Andrew LelechenkoBSD3/Andrew Lelechenko <andrew.lelechenko@gmail.com>None,=?Mg*Ô polyWrapper for polynomials over ƒ, providing a faster … instance. (c) 2019 Andrew LelechenkoBSD3/Andrew Lelechenko <andrew.lelechenko@gmail.com>Noneg,V  (c) 2019 Andrew LelechenkoBSD3/Andrew Lelechenko <andrew.lelechenko@gmail.com>None %1>HMVXgINpoly&Polynomials backed by unboxed vectors.poly$Polynomials backed by boxed vectors.poly3Polynomials of one variable with coefficients from a, backed by a m v" (boxed, unboxed, storable, etc.). Use pattern  for construction:"(X + 1) + (X - 1) :: VPoly Integer2 * X(X + 1) * (X - 1) :: UPoly Int1 * X^2 + (-1)FPolynomials are stored normalized, without zero coefficients, so 0 *  + 1 equals to 1.nW instance does not make much sense mathematically, it is defined only for the sake of   ,   , etc.polyConvert M to a vector of coefficients (first element corresponds to a constant term).†polyCreate an identity polynomial.polyCreate an identity polynomial.polyMake \ from a list of (power, coefficient) pairs. (first element corresponds to a constant term).:set -XOverloadedLists+toPoly [(0,1),(1,2),(2,3)] :: VPoly Integer3 * X^2 + 2 * X + 1)S.toPoly [(0,0),(1,0),(2,0)] :: UPoly Int0poly@Return a leading power and coefficient of a non-zero polynomial.2leading ((2 * X + 1) * (2 * X^2 - 1) :: UPoly Int) Just (3,4)leading (0 :: UPoly Int)NothingpolyLMultiply a polynomial by a monomial, expressed as a power and a coefficient. scale 2 3 (X^2 + 1) :: UPoly Int3 * X^4 + 3 * X^2poly1Create a monomial from a power and a coefficient.polyEvaluate at a given point.eval (X^2 + 1 :: UPoly Int) 310poly)Substitute another polynomial instead of .1subst (X^2 + 1 :: UPoly Int) (X + 1 :: UPoly Int)1 * X^2 + 2 * X + 2polyTake a derivative. deriv (X^3 + 3 * X) :: UPoly Int 3 * X^2 + 3polyOCompute an indefinite integral of a polynomial, setting constant term to zero.&integral (3 * X^2 + 3) :: UPoly Double1.0 * X^3 + 3.0 * X‡poly Note that q = r and s = t 1.ˆ†‰Š‹ŒŽ(c) 2019 Andrew LelechenkoBSD3/Andrew Lelechenko <andrew.lelechenko@gmail.com>None =>?HVXgM.‘polyConsider using ; wrapper, which provides a much faster implementation of ‚ for polynomials over ƒ.(c) 2019 Andrew LelechenkoBSD3/Andrew Lelechenko <andrew.lelechenko@gmail.com>None ,=>?HVXgNü(c) 2020 Andrew LelechenkoBSD3/Andrew Lelechenko <andrew.lelechenko@gmail.com>None%=?MXgupoly%Wrapper for Laurent polynomials over ƒ, providing a faster … instance. poly.Laurent polynomials backed by unboxed vectors.!poly,Laurent polynomials backed by boxed vectors."poly 0https://en.wikipedia.org/wiki/Laurent_polynomialLaurent polynomials) of one variable with coefficients from a, backed by a m v" (boxed, unboxed, storable, etc.). Use pattern # and operator , for construction:((X + 1) + (X^-1 - 1) :: VLaurent Integer1 * X + 0 + 1 * X^-1$(X + 1) * (1 - X^-1) :: ULaurent Int1 * X + 0 + (-1) * X^-1yPolynomials are stored normalized, without leading and trailing zero coefficients, so 0 * X + 1 + 0 * X^-1 equals to 1.nW instance does not make much sense mathematically, it is defined only for the sake of   ,   , etc.#polyCreate an identity polynomial.$polyDeconstruct a "H polynomial into an offset (largest possible) and a regular polynomial.%unLaurent (2 * X + 1 :: ULaurent Int) (0,2 * X + 1)(unLaurent (1 + 2 * X^-1 :: ULaurent Int)(-1,1 * X + 2)'unLaurent (2 * X^2 + X :: ULaurent Int) (1,2 * X + 1)unLaurent (0 :: ULaurent Int)(0,0)%poly Construct "L polynomial from an offset and a regular polynomial. One can imagine it as  , but allowing negative offsets.1toLaurent 2 (2 * Data.Poly.X + 1) :: ULaurent Int2 * X^3 + 1 * X^24toLaurent (-2) (2 * Data.Poly.X + 1) :: ULaurent Int2 * X^-1 + 1 * X^-2&poly@Return a leading power and coefficient of a non-zero polynomial.5leading ((2 * X + 1) * (2 * X^2 - 1) :: ULaurent Int) Just (3,4)leading (0 :: ULaurent Int)Nothing'poly1Create a monomial from a power and a coefficient.(polyLMultiply a polynomial by a monomial, expressed as a power and a coefficient.#scale 2 3 (X^2 + 1) :: ULaurent Int'3 * X^4 + 0 * X^3 + 3 * X^2 + 0 * X + 0)polyEvaluate at a given point. eval (X^2 + 1 :: ULaurent Int) 310*poly)Substitute another polynomial instead of .4subst (X^2 + 1 :: UPoly Int) (X + 1 :: ULaurent Int)1 * X^2 + 2 * X + 2+polyTake a derivative.#deriv (X^3 + 3 * X) :: ULaurent Int3 * X^2 + 0 * X + 3,poly%This operator can be applied only to #N, but is instrumental to express Laurent polynomials in mathematical fashion: X + 2 + 3 * X^-1 :: ULaurent Int1 * X + 2 + 3 * X^(-1)-polyConsider using ; wrapper, which provides a much faster implementation of ‚ for polynomials over ƒ.0poly Note that q = r and s = t 1. !"#$%&'()*+,"! $%&'(#,)*+(c) 2019 Andrew LelechenkoBSD3/Andrew Lelechenko <andrew.lelechenko@gmail.com>Noneg„–=polyCreate an identity polynomial.>polyMake O from a vector of coefficients (first element corresponds to a constant term).:set -XOverloadedListstoPoly [1,2,3] :: VPoly Integer3 * X^2 + 2 * X + 1toPoly [0,0,0] :: UPoly Int0?poly1Create a monomial from a power and a coefficient.@polyLMultiply a polynomial by a monomial, expressed as a power and a coefficient. scale 2 3 (X^2 + 1) :: UPoly Int'3 * X^4 + 0 * X^3 + 3 * X^2 + 0 * X + 0ApolyEvaluate at a given point.eval (X^2 + 1 :: UPoly Int) 310Bpoly)Substitute another polynomial instead of =.1subst (X^2 + 1 :: UPoly Int) (X + 1 :: UPoly Int)1 * X^2 + 2 * X + 2CpolyTake a derivative. deriv (X^3 + 3 * X) :: UPoly Int3 * X^2 + 0 * X + 3DpolyOCompute an indefinite integral of a polynomial, setting constant term to zero.&integral (3 * X^2 + 3) :: UPoly Double%1.0 * X^3 + 0.0 * X^2 + 3.0 * X + 0.0 =>?@ABCD>?@=ABCD (c) 2019 Andrew LelechenkoBSD3/Andrew Lelechenko <andrew.lelechenko@gmail.com>None +þ Epoly 2https://en.wikipedia.org/wiki/Legendre_polynomialsLegendre polynomials.+take 3 legendre :: [Data.Poly.VPoly Double]0[1.0,1.0 * X + 0.0,1.5 * X^2 + 0.0 * X + (-0.5)]Fpoly Ohttps://en.wikipedia.org/wiki/Legendre_polynomials#Shifted_Legendre_polynomialsShifted Legendre polynomials.3take 3 legendreShifted :: [Data.Poly.VPoly Integer]'[1,2 * X + (-1),6 * X^2 + (-6) * X + 1]Gpoly 4https://en.wikipedia.org/wiki/Gegenbauer_polynomialsGegenbauer polynomials.Hpoly 0https://en.wikipedia.org/wiki/Jacobi_polynomialsJacobi polynomials.Ipoly 3https://en.wikipedia.org/wiki/Chebyshev_polynomialsChebyshev polynomials of the first kind.$take 3 chebyshev1 :: [VPoly Integer]$[1,1 * X + 0,2 * X^2 + 0 * X + (-1)]Jpoly 3https://en.wikipedia.org/wiki/Chebyshev_polynomialsChebyshev polynomials of the second kind.$take 3 chebyshev2 :: [VPoly Integer]$[1,2 * X + 0,4 * X^2 + 0 * X + (-1)]KpolyProbabilists'  1https://en.wikipedia.org/wiki/Hermite_polynomialsHermite polynomials.%take 3 hermiteProb :: [VPoly Integer]$[1,1 * X + 0,1 * X^2 + 0 * X + (-1)]Lpoly Physicists'  1https://en.wikipedia.org/wiki/Hermite_polynomialsHermite polynomials.$take 3 hermitePhys :: [VPoly Double]$[1,2 * X + 0,4 * X^2 + 0 * X + (-2)]Mpoly 2https://en.wikipedia.org/wiki/Laguerre_polynomialsLaguerre polynomials.!take 3 laguerre :: [VPoly Double]3[1.0,(-1.0) * X + 1.0,0.5 * X^2 + (-2.0) * X + 1.0]Npoly Shttps://en.wikipedia.org/wiki/Laguerre_polynomials#Generalized_Laguerre_polynomials Generalized Laguerre polynomials EFGHIJKLMN EFGHIJKLMN(c) 2019 Andrew LelechenkoBSD3/Andrew Lelechenko <andrew.lelechenko@gmail.com>NonegŸÃ  (c) 2020 Andrew LelechenkoBSD3/Andrew Lelechenko <andrew.lelechenko@gmail.com>None%1=>?HMVXgÂËOpoly.Laurent polynomials backed by unboxed vectors.Ppoly,Laurent polynomials backed by boxed vectors.Qpoly 0https://en.wikipedia.org/wiki/Laurent_polynomialLaurent polynomials) of one variable with coefficients from a, backed by a m v" (boxed, unboxed, storable, etc.). Use pattern R and operator [ for construction:((X + 1) + (X^-1 - 1) :: VLaurent Integer1 * X + 1 * X^-1$(X + 1) * (1 - X^-1) :: ULaurent Int1 * X + (-1) * X^-1cPolynomials are stored normalized, without zero coefficients, so 0 * X + 1 + 0 * X^-1 equals to 1.nW instance does not make much sense mathematically, it is defined only for the sake of   ,   , etc.RpolyCreate an identity polynomial.SpolyDeconstruct a QH polynomial into an offset (largest possible) and a regular polynomial.%unLaurent (2 * X + 1 :: ULaurent Int) (0,2 * X + 1)(unLaurent (1 + 2 * X^-1 :: ULaurent Int)(-1,1 * X + 2)'unLaurent (2 * X^2 + X :: ULaurent Int) (1,2 * X + 1)unLaurent (0 :: ULaurent Int)(0,0)Tpoly Construct QL polynomial from an offset and a regular polynomial. One can imagine it as  , but allowing negative offsets.8toLaurent 2 (2 * Data.Poly.Sparse.X + 1) :: ULaurent Int2 * X^3 + 1 * X^2;toLaurent (-2) (2 * Data.Poly.Sparse.X + 1) :: ULaurent Int2 * X^-1 + 1 * X^-2Upoly@Return a leading power and coefficient of a non-zero polynomial.5leading ((2 * X + 1) * (2 * X^2 - 1) :: ULaurent Int) Just (3,4)leading (0 :: ULaurent Int)NothingVpoly1Create a monomial from a power and a coefficient.WpolyLMultiply a polynomial by a monomial, expressed as a power and a coefficient.#scale 2 3 (X^2 + 1) :: ULaurent Int3 * X^4 + 3 * X^2XpolyEvaluate at a given point. eval (X^2 + 1 :: ULaurent Int) 310Ypoly)Substitute another polynomial instead of .4subst (X^2 + 1 :: UPoly Int) (X + 1 :: ULaurent Int)1 * X^2 + 2 * X + 2ZpolyTake a derivative.#deriv (X^3 + 3 * X) :: ULaurent Int 3 * X^2 + 3[poly%This operator can be applied only to RN, but is instrumental to express Laurent polynomials in mathematical fashion: X + 2 + 3 * X^-1 :: ULaurent Int1 * X + 2 + 3 * X^(-1)_poly Note that q = r and s = t 1. OPQRSTUVWXYZ[ QPOSTUVWR[XYZ(c) 2019 Andrew LelechenkoBSD3/Andrew Lelechenko <andrew.lelechenko@gmail.com>None>gÒepolyCreate an identity polynomial.fpolyMake \ from a list of (power, coefficient) pairs. (first element corresponds to a constant term).:set -XOverloadedLists+toPoly [(0,1),(1,2),(2,3)] :: VPoly Integer3 * X^2 + 2 * X + 1)S.toPoly [(0,0),(1,0),(2,0)] :: UPoly Int0gpoly1Create a monomial from a power and a coefficient.hpolyLMultiply a polynomial by a monomial, expressed as a power and a coefficient. scale 2 3 (X^2 + 1) :: UPoly Int3 * X^4 + 3 * X^2ipolyEvaluate at a given point.eval (X^2 + 1 :: UPoly Int) 310jpoly)Substitute another polynomial instead of e.1subst (X^2 + 1 :: UPoly Int) (X + 1 :: UPoly Int)1 * X^2 + 2 * X + 2kpolyTake a derivative. deriv (X^3 + 3 * X) :: UPoly Int 3 * X^2 + 3lpolyOCompute an indefinite integral of a polynomial, setting constant term to zero.&integral (3 * X^2 + 3) :: UPoly Double1.0 * X^3 + 3.0 * X efghijkl fgheijkl’ !" !##$%&'() *+,-./0123456789: !;<=>?@ABCD%&'() *+,-./0E32 !FGHIJKLMNOPNQRNOSNQTUVWXYZ[\]^ _`ab`acd`aeLMUWYZ[\]_f#poly-0.4.0.0-3LJb6iSDiAnBjqPWu4KhCG Data.PolyData.Poly.SparseData.Poly.LaurentData.Poly.SemiringData.Poly.OrthogonalData.Poly.Sparse.LaurentData.Poly.Sparse.SemiringData.Poly.Internal.DenseData.SetSetData.MapMap"Data.Poly.Internal.Dense.GcdDomain PolyOverFieldData.Poly.Internal.Dense.Field Data.Poly.Internal.PolyOverFieldData.Poly.Internal.Sparse#Data.Poly.Internal.Sparse.GcdDomainData.Poly.Internal.Sparse.Fieldscale'XUPolyVPolyPolyunPolytoPolyleadingmonomialscaleevalsubstderivintegralunPolyOverFieldLaurentOverFieldunLaurentOverFieldULaurentVLaurentLaurent unLaurent toLaurent^-$fGcdDomainLaurent $fRingLaurent$fSemiringLaurent $fNumLaurent $fShowLaurent$fNFDataLaurent$fGcdDomainLaurentOverField $fEqLaurent $fOrdLaurent$fEqLaurentOverField$fNFDataLaurentOverField$fNumLaurentOverField$fOrdLaurentOverField$fRingLaurentOverField$fSemiringLaurentOverField$fShowLaurentOverFieldlegendrelegendreShifted gegenbauerjacobi chebyshev1 chebyshev2 hermiteProb hermitePhyslaguerre laguerreGen$fIsListLaurent&vector-0.12.1.2-E9YBdJZ4ywF23gc9L8wAxpData.Vector.Generic.BaseVectorghc-prim GHC.ClassesOrdX' $fNumPolybaseGHC.NumabsGHC.BaseidsignumconsttoPoly' dropWhileEndM monomial'unscale'eval'subst' substitute'deriv' integral':*:$fGcdDomainPoly&semirings-0.5.3-4Fa59Yo6BAvGlDoLt3QgzqData.EuclideangcdFieldfieldGcd GcdDomain