The horner Reference Manual

This is the horner Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 16:41:24 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 horner

Inline polynomial evaluation using Horner’s rule.

Author

Paul M. Rodriguez <>

License

MIT

Dependencies
  • alexandria (system).
  • serapeum (system).
  • infix-math (system).
Source

horner.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 horner/horner.asd

Source

horner.asd.

Parent Component

horner (system).

ASDF Systems

horner.


3.1.2 horner/package.lisp

Source

horner.asd.

Parent Component

horner (system).

Packages

horner.


3.1.3 horner/horner.lisp

Dependency

package.lisp (file).

Source

horner.asd.

Parent Component

horner (system).

Public Interface
Internals

3.1.4 horner/goertzel.lisp

Dependency

package.lisp (file).

Source

horner.asd.

Parent Component

horner (system).

Public Interface

goertzel (macro).


3.1.5 horner/evalpoly.lisp

Dependency

package.lisp (file).

Source

horner.asd.

Parent Component

horner (system).

Public Interface

evalpoly (macro).


4 Packages

Packages are listed by definition order.


4.1 horner

Source

package.lisp.

Use List
  • alexandria.
  • common-lisp.
  • infix-math/infix-math.
  • serapeum.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: evalpoly (z &body p)
Package

horner.

Source

evalpoly.lisp.

Macro: goertzel (z &body p)
Package

horner.

Source

goertzel.lisp.

Macro: horner (x &body coeffs)

Compute a polynomial using Horner’s rule.
Note that the coefficients COEFFS are provided in ascending order of powers: p0 + p1*x + p2*x^2...

Package

horner.

Source

horner.lisp.

Macro: horner/even (x &body coeffs)

Evaluate polynomial with even powers only: p0 + p1*x^2 + p2*x^4...

Package

horner.

Source

horner.lisp.

Macro: horner/odd (x &body coeffs)

Evaluate polynomial with odd powers only: p0*x + p1*x^3 + p2*x^5...

Package

horner.

Source

horner.lisp.


5.1.2 Ordinary functions

Function: eval-horner (x coeffs)

Eval COEFFS at run time, for testing.

Package

horner.

Source

horner.lisp.


5.2 Internals


5.2.1 Macros

Macro: horner/coeffs (x &body coeffs)
Package

horner.

Source

horner.lisp.

Macro: horner/monic (x &body coeffs)

Like ‘horner’ when the last coefficient is 1 (and omitted). Cf. p1evl in Cephes.

Package

horner.

Source

horner.lisp.

Macro: horner/precond (x &body coeffs)
Package

horner.

Source

horner.lisp.

Macro: horner/simple (x &body coeffs)
Package

horner.

Source

horner.lisp.

Macro: quartic (x u0 u1 u2 u3 u4)

Better-than-Horner computation of the quartic. See Higham 2002, Knuth v.2.

Package

horner.

Source

horner.lisp.

Macro: quintic (x u0 u1 u2 u3 u4 u5)
Package

horner.

Source

horner.lisp.

Macro: sextic (x u0 u1 u2 u3 u4 u5 u6)

Optimized sextic using Pan’s method.

Package

horner.

Source

horner.lisp.


5.2.2 Ordinary functions

Function: monic (&rest coefficients)

Convert coefficients u_0, u_1... u_n to monic form and return them as multiple values.

Package

horner.

Source

horner.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables