How this calculation works
Evaluate a pole-free real Floater–Hormann interpolant using local polynomial blends expressed in barycentric form.
r(x)=[Σ_i w_i y_i/(x-x_i)]/[Σ_i w_i/(x-x_i)], w_i=Σ_(k=max(0,i-d))^min(i,n-d) (-1)^k Π_(j=k,j≠i)^(k+d) 1/(x_i-x_j), for nodes indexed 0..n.A worked example
Five samples y=x² at x=0,1,2,3,4 with local degree 2 give r(1.5)=2.25 and r′(1.5)=3. Normalized weights are proportional to (1,-3,4,-3,1).
Good to know
3–60 distinct ordered real nodes, local blend degree 0–min(8,n−2), in-range query; barycentric weights normalized for stability and exact node hit limits. Return weights, value, derivative and denominator cancellation diagnostic. No d=n−1 duplicate of global polynomial mode, complex poles, extrapolation promise or smoothing.
Reference: Floater and Hormann original paper (opens in a new tab) ↗
Choose data and a local blending degree
Provide three through sixty real sample pairs with distinct increasing x coordinates. Every y value is an interpolation target. The local degree controls how many neighboring nodes contribute to each polynomial in the underlying blend. Degree zero already produces a rational interpolant; increasing the degree changes its approximation behavior without adding observations or estimating a statistical model.
The allowed degree is zero through the smaller of eight and the number of samples minus two. The upper restriction excludes the single global interpolation polynomial as a nominally separate mode. Select degree based on data quality, spacing and expected smoothness, then compare nearby choices as a sensitivity check. A higher degree should not automatically be presented as a more accurate answer for unknown or noisy data.
Compare this with the Polynomial interpolation calculator from points. Existing point interpolation constructs one polynomial; Padé pages use Taylor coefficients, and sampled-data rational approximation uses greedy AAA fitting. Floater–Hormann interpolates all ordered real nodes using local-polynomial blending with a user degree and no real poles in exact arithmetic.
Understand the barycentric representation
The interpolant is a quotient of two weighted sums, with terms that individually become large near sample nodes. This representation avoids explicitly expanding a high-degree numerator and denominator polynomial. Multiplying all weights by the same nonzero factor leaves the quotient unchanged, so normalized weights are more useful for stable numerical evaluation than arbitrarily large raw products.
At an exact sample node the displayed formula has a removable expression of the form infinity divided by infinity. The implementation must return the supplied y value directly rather than evaluating those singular terms. The derivative at a node has its own limiting expression. Replacing a small denominator with a made-up epsilon changes the interpolation problem and can corrupt both the value and the derivative.
Distinguish a theorem from numerical conditioning
For ordered distinct real nodes the Floater–Hormann construction avoids real poles in exact arithmetic. That structural property does not mean every floating-point sum is well conditioned. Nearly canceling denominator terms can make a computed quotient sensitive to rounding even while the exact mathematical denominator is nonzero. A denominator cancellation diagnostic therefore belongs beside the requested value.
A useful diagnostic compares the magnitude of the signed denominator sum with the sum of magnitudes of its terms. A very small ratio warns that many digits can be lost through cancellation. It is a local evaluation condition indicator, not an estimate of the unknown interpolation error. No exact source function is available from arbitrary tabulated samples, so the page must keep those two kinds of uncertainty separate.
Check exact polynomial reproduction
The default observations are the five values 0,1,4,9,16 at x coordinates 0 through 4. Each consecutive three-node quadratic interpolant is exactly x². Their rational blend therefore reproduces x² throughout the range wherever evaluated. This gives a useful nonconstant test that exercises multiple local windows while retaining an elementary expected answer.
One normalized weight vector is (1,-3,4,-3,1), up to a common factor and global sign. At x=1.5 the barycentric quotient evaluates to 9/4 and its derivative to 3. Evaluating at x=2 must return 4 exactly through the node branch. These checks distinguish a correct limiting evaluation from an implementation that happens to be accurate away from all observations.
Read the rational interpolation comparison
The illustrative curve compares a local rational interpolation idea with a high-degree polynomial on a Runge-like sample pattern. Large endpoint oscillations in a global polynomial can coexist with exact node interpolation. The rational method changes the interpolation family while leaving the original samples fixed, which can be useful when the data locations cannot be redesigned.
The artwork is conceptual and does not make an error bound for the default quadratic or for edited observations. With the default degree-two polynomial data, the exact rational curve is itself x². For arbitrary data, inspect the reported value, derivative and denominator diagnostic and compare several nearby query positions. A visually smooth curve alone does not validate unobserved behavior or show that measurement noise is negligible.
Stay inside the declared numerical domain
Queries are limited to the closed sample range. Although the formula can be evaluated elsewhere in many cases, extrapolation can be poorly conditioned and lacks the same practical support from neighboring observations. The tool also rejects duplicate or numerically inseparable nodes rather than silently averaging them or sorting away conflicting responses. The input data remain under the user’s control.
Scaling and centering the x coordinates can improve product and difference calculations without changing the geometric interpolation relation after units are transformed consistently. Derivatives require the corresponding inverse horizontal scale factor. Extremely uneven spacing can still produce sensitive results, so the weight normalization and cancellation report are safeguards rather than guarantees of every displayed digit. A flagged result calls for a better-scaled calculation or a different model.
Use the interpolant for the right task
Floater–Hormann interpolation is useful when exact fitting at fixed nodes is desired and a local-degree rational construction is preferable to one global polynomial. It does not impose monotonicity, positivity or convexity on arbitrary data. If the application requires local shape preservation, compare the actual derivative and interval behavior with a shape-preserving method before selecting the curve.
A smoothing regression solves a different problem by allowing residuals at the observations. A rational approximation derived from an analytic expression may use information beyond the samples and may allow poles outside its approximation interval. This calculator constructs only the stated real-data interpolation family. Its output should be described as an interpolated value under that convention, with numerical diagnostics, rather than a universally best rational approximation.
A few questions, answered
Does multiplying weights change the answer?
A common nonzero factor cancels from numerator and denominator, so normalized weights are equivalent.
What happens at a sample node?
The exact interpolated value is returned using the removable-limit branch.
Does pole-free mean rounding-free?
No. Floating-point denominator cancellation can still reduce numerical accuracy.
Does this preserve monotonicity?
No general monotonicity guarantee is provided for arbitrary data.