?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij k l m n o p q r s t u v  NonewxwxwxNone 2346=BKyz{|}~yz{yz{~}|None !"=K "Little-Endian (head is const term)'Big-Endian (head is highest-order term)+Like fmap, but able to preserve unboxednesslike  fmap WrapNum but using  to avoid a pointless traversallike fmap unwrapNum but using  to avoid a pointless traversalTrim zeroes from a polynomial (given a predicate for identifying zero). In particular, drops zeroes from the highest-order coefficients, so that -0x^n + 0x^(n-1) + 0x^(n-2) + ... + ax^k + ..., a /= 0 is normalized to  ax^k + .... The  instance for D and all the standard constructors / destructors are defined using  trim (0==). The polynomial "0" Make a C from a list of coefficients using the specified coefficient order. Make a & from a list of coefficients, at most n of which are significant.Make a Q from a list of coefficients using the specified coefficient order, without the L context (and therefore without trimming zeroes from the coefficient list)Get the degree of a a 0 (the highest exponent with nonzero coefficient)Get the coefficients of a a  in the specified order.Get the coefficients of a a  in the specified order..    $  None 234?None 3?!The polynomial "1""The polynomial (in x) "x"#Given some constant k7, construct the polynomial whose value is constantly k.$Given some scalar s and a polynomial f, computes the polynomial g such that: evalPoly g x = s * evalPoly f x%Given some polynomial f, computes the polynomial g such that: $evalPoly g x = negate (evalPoly f x)&Given polynomials f and g, computes the polynomial h such that: *evalPoly h x = evalPoly f x + evalPoly g x(Given polynomials f and g, computes the polynomial h such that: *evalPoly h x = evalPoly f x * evalPoly g xH(Internal): multiply polynomials in LE order. O(length xs * length ys).)Given a polynomial f and exponent n, computes the polynomial g such that: evalPoly g x = evalPoly f x ^ n*Given polynomials a and b, with b not  , computes polynomials q and r such that: addPoly (multPoly q b) r == a-composePoly f g constructs the polynomial h such that: $evalPoly h = evalPoly f . evalPoly gThis is a very expensive operation and, in general, returns a polynomial that is quite a bit more expensive to evaluate than f and g together (because it is of a much higher order than either). Unless your polynomials are quite small or you are quite certain you need the coefficients of the composed polynomial, it is recommended that you simply evaluate f and g] and explicitly compose the resulting functions. This will usually be much more efficient.H(internal) add a scalar to a list of polynomial coefficients in LE order.vEvaluate a polynomial at a point or, equivalently, convert a polynomial to the function it represents. For example,  evalPoly " =  and  evalPoly (# k) =  k./CEvaluate a polynomial and its derivative (respectively) at a point.0fEvaluate a polynomial and all of its nonzero derivatives at a point. This is roughly equivalent to: \evalPolyDerivs p x = map (`evalPoly` x) (takeWhile (not . polyIsZero) (iterate polyDeriv p))1;"Contract" a polynomial by attempting to divide out a root.contractPoly p a returns (q,r) such that q*(x-a) + r == p2 gcdPoly a bI computes the highest order monic polynomial that is a divisor of both a and b . If both a and b are  , the result is undefined.3ANormalize a polynomial so that its highest-order coefficient is 14'Compute the derivative of a polynomial.5zCompute all nonzero derivatives of a polynomial, starting with its "zero'th derivative", the original polynomial itself.6<Compute the definite integral (from 0 to x) of a polynomial. !"#$%&'()*+,-./0123456   !"#$%&'()*+,-./0123456   !#"$%-&'()*+,./0132456 !"#$%&'()*+,-./0123456None 3?7Given some constant k7, construct the polynomial whose value is constantly k.8Given some scalar s and a polynomial f, computes the polynomial g such that: evalPoly g x = s * evalPoly f x9Given some polynomial f, computes the polynomial g such that: $evalPoly g x = negate (evalPoly f x):Given polynomials f and g, computes the polynomial h such that: *evalPoly h x = evalPoly f x + evalPoly g x<Given polynomials f and g, computes the polynomial h such that: *evalPoly h x = evalPoly f x * evalPoly g x=Given a polynomial f and exponent n, computes the polynomial g such that: evalPoly g x = evalPoly f x ^ n>Given polynomials a and b, with b not  , computes polynomials q and r such that: addPoly (multPoly q b) r == aAcomposePoly f g constructs the polynomial h such that: $evalPoly h = evalPoly f . evalPoly gThis is a very expensive operation and, in general, returns a polynomial that is quite a bit more expensive to evaluate than f and g together (because it is of a much higher order than either). Unless your polynomials are quite small or you are quite certain you need the coefficients of the composed polynomial, it is recommended that you simply evaluate f and g] and explicitly compose the resulting functions. This will usually be much more efficient.BvEvaluate a polynomial at a point or, equivalently, convert a polynomial to the function it represents. For example,  evalPoly " =  and  evalPoly (7 k) =  k.CCEvaluate a polynomial and its derivative (respectively) at a point.DfEvaluate a polynomial and all of its nonzero derivatives at a point. This is roughly equivalent to: \evalPolyDerivs p x = map (`evalPoly` x) (takeWhile (not . polyIsZero) (iterate polyDeriv p))E;"Contract" a polynomial by attempting to divide out a root.contractPoly p a returns (q,r) such that q*(x-a) + r == pF gcdPoly a bI computes the highest order monic polynomial that is a divisor of both a and b . If both a and b are  , the result is undefined.GANormalize a polynomial so that its highest-order coefficient is 1H'Compute the derivative of a polynomial.IzCompute all nonzero derivatives of a polynomial, starting with its "zero'th derivative", the original polynomial itself.J<Compute the definite integral (from 0 to x) of a polynomial.KSeparate a nonzero polynomial into a set of factors none of which have multiple roots, and the product of which is the original polynomial. Note that if division is not exact, it may fail to separate roots. Rational coefficients is a good idea.BUseful when applicable as a way to simplify root-finding problems.789:;<=>?@ABCDEFGHIJK! !"789:;<=>?@ABCDEFGHIJK!  !7"89A:;<=>?@BCDEGFKHIJ789:;<=>?@ABCDEFGHIJKNone?L&The Bernstein basis polynomials. The n8th inner list is a basis for the polynomials of order n or lower. The nth basis consists of n polynomials of order n which sum to 10, and have roots of varying multiplicities at 0 and 1.MevalBernstein n v x evaluates the v"'th Bernstein polynomial of order n at the point x.NbernsteinFit n f: Approximate a function f< as a linear combination of Bernstein polynomials of order n9. This approximation converges slowly but uniformly to f on the interval [0,1].O)Evaluate a polynomial given as a list of n coefficients for the nth Bernstein basis. Roughly: RevalBernsteinSeries cs = sum (zipWith scalePoly cs (bernstein !! (length cs - 1)))P~de Casteljau's algorithm, returning the whole tableau. Used both for evaluating and splitting polynomials in Bernstein form.Q\Given a polynomial in Bernstein form (that is, a list of coefficients for a basis set from L, such as is returned by N) and a parameter value x1, split the polynomial into two halves, mapping [0,x] and [x,1] respectively onto [0,1].]A typical use for this operation would be to split a Bezier curve (inserting a new knot at x).LMNOPQLMNOPQLMNOPQLMNOPQNoneR5Bernoulli polynomial with a nonstandard normalization b_i = bernoulliPoly !! ixHas the following generating function (C.2 in IH Sloan & S Joe "Lattice Methods for multiple integration" 1994 page 227) -t exp(x*t) / (exp(t) - 1) = sum_{i=0} b_i t^i&The standard normalization would have = sum_{i=0} B_i t^i / i!RRRRNone? S1The Chebyshev polynomials of the first kind with  coefficients.ULCompute the coefficients of the n'th Chebyshev polynomial of the first kind.VMCompute the coefficients of the n'th Chebyshev polynomial of the second kind.WEvaluate the n'th Chebyshev polynomial of the first kind at a point X. Both more efficient and more numerically stable than computing the coefficients and evaluating the polynomial.XFEvaluate all the Chebyshev polynomials of the first kind at a point X.YEvaluate the n'th Chebyshev polynomial of the second kind at a point X. Both more efficient and more numerically stable than computing the coefficients and evaluating the polynomial.ZGEvaluate all the Chebyshev polynomials of the second kind at a point X.[CEvaluate the n'th Chebyshev polynomials of both kinds at a point X.\BEvaluate all the Chebyshev polynomials of both kinds at a point X.]ECompute the roots of the n'th Chebyshev polynomial of the first kind.^NCompute the extreme points of the n'th Chebyshev polynomial of the first kind._chebyshevFit n f" returns a list of N coefficients cs such that f x ~= sum (zipWith (*) cs (evalTs x)) on the interval -1 < x < 1.The N roots of the N'th Chebyshev polynomial are the fitting points at which the function will be evaluated and at which the approximation will be exact. These points always lie within the interval -1 < x < 1. Outside this interval, the approximation will diverge quickly.!This function deviates from most chebyshev-fit implementations in that it returns the first coefficient pre-scaled so that the series evaluation operation is a simple inner product, since in most other algorithms operating on chebyshev series, that factor is almost always a nuissance.`DEvaluate a Chebyshev series expansion with a finite number of terms.mNote that this function expects the first coefficient to be pre-scaled by 1/2, which is what is produced by _{. Thus, this computes a simple inner product of the given list with a matching-length sequence of chebyshev polynomials.STUVWXYZ[\]^_`STUVWXYZ[\]^_`STUVWXYZ[\]^_`STUVWXYZ[\]^_`NoneabcdefabcdefabcdefabcdefNone?gReturns the Lagrange basis set of polynomials associated with a set of points. This is the set of polynomials each of which is 14 at its corresponding point in the input list and 0 at all others.These polynomials are especially convenient, mathematically, for interpolation. The interpolating polynomial for a set of points (x,y) is given by using the y+s as coefficients for the basis given by lagrangeBasis xsJ. Computationally, this is not an especially stable procedure though.  B implements a slightly better algorithm based on the same idea. BGenerally it is better to not compute the coefficients at all.   evaluates the interpolating polynomial directly, and is both quicker and more stable than any method I know of that computes the coefficients.hConstruct the Lagrange "master polynomial" for the Lagrange barycentric form: That is, the monic polynomial with a root at each point in the input list.iTCompute the weights associated with each abscissa in the Lagrange barycentric form.ghighighighi None?jEvaluate a polynomial passing through the specified set of points. The order of the interpolating polynomial will (at most) be one less than the number of points given.kComputes the tableau generated by Neville's algorithm. Each successive row of the table is a list of interpolants one order higher than the previous, using a range of input points starting at the same position in the input list as the interpolant's position in the output list.l5Computes the tableau generated by a modified form of Neville's algorithm described in Numerical Recipes, Ch. 3, Sec. 2, which records the differences between interpolants at each level. Each pair (c,d) is the amount to add to the previous level's interpolant at either the same or the subsequent position (respectively) in order to obtain the new level's interpolant. Mathematically, either sum yields the same value, but due to numerical errors they may differ slightly, and some "paths" through the table may yield more accurate final results than others.mcFit a polynomial to a set of points by iteratively evaluating the interpolated polynomial (using j) at 0 to establish the constant coefficient and reducing the polynomial by subtracting that coefficient from all y's and dividing by their corresponding x's. Slower than n1 but stable under different sets of conditions.Note that computing the coefficients of a fitting polynomial is an inherently ill-conditioned problem. In most cases it is both faster and more accurate to use j or l, instead of evaluating a fitted polynomial.nKFit a polynomial to a set of points using barycentric Lagrange polynomials.Note that computing the coefficients of a fitting polynomial is an inherently ill-conditioned problem. In most cases it is both faster and more accurate to use j or l, instead of evaluating a fitted polynomial.jklmnjklmnjklmnjklmn None?oThe Legendre polynomials with  coefficients. These polynomials form an orthogonal basis of the space of all polynomials, relative to the L2 inner product on [-1,1] (which is given by integrating the product of 2 polynomials over that range).p9Compute the coefficients of the n'th Legendre polynomial.qEvaluate the n'th Legendre polynomial at a point X. Both more efficient and more numerically stable than computing the coefficients and evaluating the polynomial.r3Evaluate all the Legendre polynomials at a point X.sEvaluate the n'th Legendre polynomial and its derivative at a point X. Both more efficient and more numerically stable than computing the coefficients and evaluating the polynomial.t'Zeroes of the n'th Legendre polynomial.opqrstopqrstopqrstopqrst NoneuReturns the Newton basis set of polynomials associated with a set of abscissas. This is the set of monic polynomials each of which is 0, at all previous points in the input list.uuuu Nonevvv !"#$%&'()*+,-./&+0123456789:;<=>?@ABCDE23456FGHIJK=>?@LMCDENOPQRSTUVWXYZ[\]^_`abcdefghijkl  m n o  p q r s t u v w x yz{|}~polynomial-0.7.2Math.Polynomial.TypeMath.Polynomial.VectorSpaceMath.PolynomialMath.Polynomial.BernsteinMath.Polynomial.BernoulliMath.Polynomial.ChebyshevMath.Polynomial.HermiteMath.Polynomial.LagrangeMath.Polynomial.InterpolationMath.Polynomial.LegendreMath.Polynomial.NewtonMath.Polynomial.NumInstanceData.List.ZipSumData.VectorSpace.WrappedNumMath.Polynomial.PrettylagrangePolyFit polyInterpPoly EndiannessLEBEmapPoly rawMapPolywrapPoly unwrapPolytrimvTrimzeropolypolyN unboxedPoly unboxedPolyN unboxPoly rawListPoly rawListPolyN rawVectorPolyrawUVectorPoly polyDegree rawPolyDegree rawPolyLength polyCoeffs vPolyCoeffs polyIsZero polyIsOnerawCoeffsOrder rawPolyCoeffsuntrimmedPolyCoeffsonex constPoly scalePoly negatePolyaddPolysumPolys multPolyWith powPolyWithquotRemPolyWith quotPolyWith remPolyWithcomposePolyWithevalPoly evalPolyDerivevalPolyDerivs contractPoly gcdPolyWith monicPolyWith polyDeriv polyDerivs polyIntegralmultPolypowPoly quotRemPolyquotPolyremPoly composePolygcdPoly monicPoly separateRoots bernstein evalBernstein bernsteinFitevalBernsteinSeries deCasteljausplitBernsteinSeries bernoulliPolytsustuevalTevalTsevalUevalUsevalTUevalTsUstRootstExtrema chebyshevFitevalChebyshevSeries probHermite physHermiteevalProbHermiteevalProbHermiteDerivevalPhysHermiteevalPhysHermiteDeriv lagrangeBasislagrangelagrangeWeightsneville nevilleDiffsiterativePolyFit legendreslegendre evalLegendre evalLegendresevalLegendreDeriv legendreRoots newtonBasis $fNumPolyzipSumzipSumV WrappedNumWrapNum unwrapNum V_Wrapped MV_Wrapped$fVectorSpaceWrappedNum$fAdditiveGroupWrappedNumTFCo:R:VectorWrappedNumbase Unsafe.Coerce unsafeCoerceghc-prim GHC.ClassesEqGHC.NumNum UVectorPolyuvCoeffs VectorPolyvCoeffsListPolytrimmed endianness listCoeffsdropEnd$fVectorSpacePoly$fAdditiveGroupPoly $fFunctorPoly$fEqPoly $fShowPoly $fNFDataPoly$fNFDataEndiannesspPrintPolyWithparenSep pPrintOrdTermsignpPrintUnOrdTerm $fPrettyPoly$fPrettyComplex $fPrettyPoly0multPolyWithLE addScalarLEGHC.BaseidconstvPolyN biIntegralBi integer-gmpGHC.Integer.TypeIntegerselectGHC.RealRational