<p>We propose an algorithm for quickly evaluating polynomials. It pre-conditions a complex polynomial <i>P</i> of degree <i>d</i> in time <InlineEquation ID="IEq1"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="211_2025_1454_Article_IEq1.gif" Format="GIF" Height="19" Rendition="HTML" Resolution="72" Type="Linedraw" Width="71" /> </InlineMediaObject> <EquationSource Format="TEX">\(O(d\log d)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mo stretchy="false">(</mo> <mi>d</mi> <mo>log</mo> <mi>d</mi> <mo stretchy="false">)</mo> </mrow> </math></EquationSource> </InlineEquation>, with a low multiplicative constant independent of the precision. Subsequent evaluations of <i>P</i> computed with a fixed precision of <i>p</i> bits are performed in <i>average</i> arithmetic complexity <InlineEquation ID="IEq2"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="211_2025_1454_Article_IEq2.gif" Format="GIF" Height="23" Rendition="HTML" Resolution="72" Type="Linedraw" Width="129" /> </InlineMediaObject> <EquationSource Format="TEX">\(O\big (\sqrt{d(p+\log d)}\big )\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mrow> <mo maxsize="1.2em" minsize="1.2em" stretchy="true">(</mo> </mrow> <msqrt> <mrow> <mi>d</mi> <mo stretchy="false">(</mo> <mi>p</mi> <mo>+</mo> <mo>log</mo> <mi>d</mi> <mo stretchy="false">)</mo> </mrow> </msqrt> <mrow> <mo maxsize="1.2em" minsize="1.2em" stretchy="true">)</mo> </mrow> </mrow> </math></EquationSource> </InlineEquation> and memory <i>O</i>(<i>dp</i>). The average complexity is computed with respect to points <InlineEquation ID="IEq3"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="211_2025_1454_Article_IEq3.gif" Format="GIF" Height="14" Rendition="HTML" Resolution="72" Type="Linedraw" Width="42" /> </InlineMediaObject> <EquationSource Format="TEX">\(z \in \mathbb {C}\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>z</mi> <mo>∈</mo> <mi mathvariant="double-struck">C</mi> </mrow> </math></EquationSource> </InlineEquation>, weighted by the spherical area of&#xa0;<InlineEquation ID="IEq4"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="211_2025_1454_Article_IEq4.gif" Format="GIF" Height="17" Rendition="HTML" Resolution="72" Type="Linedraw" Width="13" /> </InlineMediaObject> <EquationSource Format="TEX">\(\overline{\mathbb C}\)</EquationSource> <EquationSource Format="MATHML"><math> <mover> <mi mathvariant="double-struck">C</mi> <mo>¯</mo> </mover> </math></EquationSource> </InlineEquation>. The worst case does not exceed the complexity of Hörner’s scheme. In particular, our algorithm performs asymptotically as <InlineEquation ID="IEq5"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="211_2025_1454_Article_IEq5.gif" Format="GIF" Height="20" Rendition="HTML" Resolution="72" Type="Linedraw" Width="85" /> </InlineMediaObject> <EquationSource Format="TEX">\(O(\sqrt{d\log d})\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mo stretchy="false">(</mo> <msqrt> <mrow> <mi>d</mi> <mo>log</mo> <mi>d</mi> </mrow> </msqrt> <mo stretchy="false">)</mo> </mrow> </math></EquationSource> </InlineEquation> per evaluation. For many classes of polynomials, in particular those with random coefficients in a bounded region of <InlineEquation ID="IEq6"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="211_2025_1454_Article_IEq6.gif" Format="GIF" Height="14" Rendition="HTML" Resolution="72" Type="Linedraw" Width="13" /> </InlineMediaObject> <EquationSource Format="TEX">\(\mathbb {C}\)</EquationSource> <EquationSource Format="MATHML"><math> <mi mathvariant="double-struck">C</mi> </math></EquationSource> </InlineEquation>, or for sparse polynomials, our algorithm performs much better than this upper bound, without any modification or parameterization. The article contains a detailed analysis of the complexity and a full error analysis, which guarantees that the algorithm performs as well as Hörner’s scheme, only faster. Our algorithm is implemented in a companion library, written in standard <Emphasis FontCategory="NonProportional">C</Emphasis> and released as an open-source project (Mihalache and Vigneron, in: FPE library: a Fast Polynomial Evaluator, <a href="https://github.com/fvigneron/FastPolyEval">https://github.com/fvigneron/FastPolyEval</a>, 2022). Our claims regarding complexity and accuracy are confirmed in practice by a set of comprehensive benchmarks.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Fast evaluation of real and complex polynomials

  • Ramona Anton,
  • Nicolae Mihalache,
  • François Vigneron

摘要

We propose an algorithm for quickly evaluating polynomials. It pre-conditions a complex polynomial P of degree d in time \(O(d\log d)\) O ( d log d ) , with a low multiplicative constant independent of the precision. Subsequent evaluations of P computed with a fixed precision of p bits are performed in average arithmetic complexity \(O\big (\sqrt{d(p+\log d)}\big )\) O ( d ( p + log d ) ) and memory O(dp). The average complexity is computed with respect to points \(z \in \mathbb {C}\) z C , weighted by the spherical area of  \(\overline{\mathbb C}\) C ¯ . The worst case does not exceed the complexity of Hörner’s scheme. In particular, our algorithm performs asymptotically as \(O(\sqrt{d\log d})\) O ( d log d ) per evaluation. For many classes of polynomials, in particular those with random coefficients in a bounded region of \(\mathbb {C}\) C , or for sparse polynomials, our algorithm performs much better than this upper bound, without any modification or parameterization. The article contains a detailed analysis of the complexity and a full error analysis, which guarantees that the algorithm performs as well as Hörner’s scheme, only faster. Our algorithm is implemented in a companion library, written in standard C and released as an open-source project (Mihalache and Vigneron, in: FPE library: a Fast Polynomial Evaluator, https://github.com/fvigneron/FastPolyEval, 2022). Our claims regarding complexity and accuracy are confirmed in practice by a set of comprehensive benchmarks.