Fast polynomial evaluation and composition
نویسنده
چکیده
The library fast polynomial for Sage compiles multivariate polynomials for subsequent fast evaluation. Several evaluation schemes are handled, such as Hörner, divide and conquer and new ones can be added easily. Notably, a new scheme is introduced that improves the classical divide and conquer scheme when the number of terms is not a pure power of two. Natively, the library handles polynomials over gmp big integers, boost intervals, python numeric types. And any type that supports addition and multiplication can extend the library thanks to the template design. Finally, the code is parallelized for the divide and conquer schemes, and memory allocation is localized and optimized for the different evaluation schemes. This extended abstract presents the concepts behind the fast polynomial library. The sage package can be downloaded at: http://trac.sagemath.org/sage_trac/ticket/13358. In Section 1, we present the notion of evaluation tree and function scheme that unifies and extends state of the art algorithms for polynomial evaluation, such as the Hörner scheme [Mul06] or divide and conquer algorithms [Mul06, Est60, BK75, BZ11]. Section 2 reviews the different optimisations implemented in the library (multi-threads, template, fast exponentiation), that allows the library to compete with state-of-the art implementations. Finally, Section 3 shows experimental results. 1 Polynomial preprocessing Given a polynomial with integer, floating points, or even polynomial coefficients, there is several way to evaluate it. Some are better suited than others for specific data type. An evaluation tree specifies how the polynomial will be evaluated. Definition 1.1. An evaluation tree Tp associated to a polynomial p is an acyclic graph with a root node R. Each node N corresponds to a monomial of p and has 2 labels, denoted by c(N), the coefficient associated to N , and d(N), the partial degree associated to N . The result of an evaluation tree on x is defined recursively: T (x) = { c(R)xd(R) if R is the only node of T . (c(R) + ∑ i Si(x))x d(R) otherwise, where Si are the children tree of R. Each node of an evaluation tree is naturally associated with a term of the input polynomial. However, the partial degree of a node N is not the degree of monomial associated to N . The degree of the monomial associated to N is rather the sum of the partial degrees of its ancestors. If we order the terms of p in a decreasing lexicographical ordering, we induce naturally an ordering on the nodes of Tp. This ordering is also a topological ordering of Tp and will be denoted subsequently by <t. The first node is the bigger for <t and will have index 0. The last node is the root of the tree and will have index n. In particular, all the children of a node of index i have an index lower than i. 1.1 Function scheme A way to define an evaluation scheme for univariate polynomials is to use a function scheme.
منابع مشابه
Fast polynomial factorization, modular composition, and multipoint evaluation of multivariate polynomials in small characteristic
We obtain randomized algorithms for factoring degree n univariate polynomials over Fq that use O(n + n log q) field operations, when the characteristic is at most n. When log q < n, this is asymptotically faster than the best previous algorithms (von zur Gathen & Shoup (1992) and Kaltofen & Shoup (1998)); for log q ≥ n, it matches the asymptotic running time of the best known algorithms. The im...
متن کاملA Practical Univariate Polynomial Composition Algorithm
We revisit a divide-and-conquer algorithm, originally described by Brent and Kung for composition of power series, showing that it can be applied practically to composition of polynomials in Z[x] given in the standard monomial basis. We offer a complexity analysis, showing that it is asymptotically fast, avoiding coefficient explosion in Z[x]. The algorithm is straightforward to implement and p...
متن کاملFast polynomial factorization and modular composition
We obtain randomized algorithms for factoring degree n univariate polynomials over Fq requiring O(n1.5+o(1) log q + n1+o(1) logq) bit operations. When log q < n, this is asymptotically faster than the best previous algorithms [J. von zur Gathen and V. Shoup, Comput. Complexity, 2 (1992), pp. 187–224; E. Kaltofen and V. Shoup, Math. Comp., 67 (1998), pp. 1179– 1197]; for log q ≥ n, it matches th...
متن کاملPolynomial evaluation groupoids and their groups
In this paper, we show how certain metabelian groups can be found within polynomial evaluation groupoids. We show that every finite abelian group can beobtained as a polynomial evaluation groupoid.
متن کاملFORMULATION DEVELOPMENT AND EVALUATION OF CLOPIDOGREL FASTDISSOLVING TABLETS
The main objective of present research work is to formulate the Clopidogrel Fast Dissolving tablets. Clopidogrel, an antiplatelet drug, belongs to BCS Class-II and used to control Heart attack, Hypertension by inhibiting Platelet activation and aggregation .The Fast Dissolving tablets of Clopidogrel were prepared employing different concentrations of Crospovidone and Croscarmellose sodium in di...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- CoRR
دوره abs/1307.5655 شماره
صفحات -
تاریخ انتشار 2013