sigma  1.0.0
Loading...
Searching...
No Matches
Taylor Models

Motivation

The Affine page ended with two unresolved limitations. Affine arithmetic is first order by construction, so every nonlinear operation collapses all higher-order information into a single lumped error symbol; and its term-pruning strategy controls symbol growth only by discarding contributions outright, which gives up the guarantee that the result encloses the true value.

Both follow from the same root cause: a linear form has nowhere to put quadratic and higher information, and no place to record what was thrown away. A Taylor model fixes both by generalizing the representation in two directions at once. The linear form becomes a polynomial of arbitrary order \( n \), and an explicit interval is carried alongside it to account for everything the polynomial does not capture.

The approach is due to Berz and Makino, and this page follows their survey of validated inclusion methods. It is the same differential algebra that underpins COSY INFINITY and, more recently, DACE.

The classes described here, Taylor and TaylorModel, are implemented, including compose_ and the elementary functions built on it (sqrt, exp, log, pow), division, and Eigen support. Antiderivation is the sole exception, noted as deferred where it comes up below. This page specifies the mathematics and the design those implementations follow.

The Taylor model

Let \( f \) be a function on a domain \( D \subset \mathbb{R}^v \) that is \( n + 1 \) times continuously partially differentiable, let \( x_0 \in D \), and let \( P \) be the order- \( n \) Taylor polynomial of \( f \) about \( x_0 \). If the interval \( I \) satisfies

\begin{equation} \normalsize f(x) \in P\left(x - x_0\right) + I \qquad \forall x \in D \label{eq:tm-inclusion} \end{equation}

then the pair \( (P, I) \) is an order- \( n \) Taylor model of \( f \) about \( x_0 \) on \( D \). Eq. \(\eqref{eq:tm-inclusion}\) is called the inclusion property, and it is the invariant that gives the representation its meaning: the polynomial carries the shape of the function, the interval bounds how far the truth can stray from that shape, and together they enclose \( f \) between two hypersurfaces over the whole domain. **Every operation defined below exists to preserve Eq. \(\eqref{eq:tm-inclusion}\).** An operation that produces a tighter result at the cost of Eq. \(\eqref{eq:tm-inclusion}\) has not improved the answer, it has invalidated it.

Sigma normalizes each expansion variable to \( [-1, 1] \), exactly as the affine representation does with its error symbols. This is the standard change of variables \( \delta = (x - x_0) / \mathrm{rad}(D) \), and it keeps the domain implicit, so a Taylor model needs no separate domain object. For a single variable ( \( v = 1 \)) this convention makes \( P \) an ordinary degree- \( n \) polynomial in \( \delta \), indexed by the usual integer power \( k \)

\begin{equation} \normalsize P(\delta) = \sum_{k=0}^{n} c_{k}\, \delta^{k} \qquad \delta \in [-1, 1] \label{eq:tm-poly-1d} \end{equation}

with \( c_k \) the coefficient of \( \delta^k \).

For \( v > 1 \) variables, a single integer no longer says which variable a power belongs to, so the exponent \( k \) generalizes to a multi-index \( \beta = (\beta_1, \ldots, \beta_v) \), one non-negative integer per variable. It plays the role of \( k \) in three ways: \( \delta^{\beta} \) abbreviates the monomial \( \delta_1^{\beta_1} \delta_2^{\beta_2} \cdots \delta_v^{\beta_v} \); the total degree \( |\beta| = \beta_1 + \cdots + \beta_v \) takes the place of \( k \) itself, so truncating at order \( n \) means keeping every \( \beta \) with \( |\beta| \leq n \); and each multi-index still has exactly one coefficient \( c_\beta \), so the polynomial remains, as in the one-variable case, a finite sum of coefficient times monomial. With this notation Eq. \(\eqref{eq:tm-poly-1d}\) generalizes directly

\begin{equation} \normalsize P(\delta) = \sum_{\left|\beta\right| \leq n} c_{\beta}\, \delta^{\beta} \qquad \delta \in [-1, 1]^v \label{eq:tm-poly} \end{equation}

Comparing Eq. \(\eqref{eq:tm-poly}\) with the affine form makes the relationship to the earlier representations concrete

representation equivalent Taylor model
Interval order 0, remainder equal to the whole bound
Affine order 1, empty remainder
TaylorModel order \( n \), remainder interval

so the three pages of this series describe one construction at three truncation orders rather than three unrelated ideas.

Truncation and range bounding

Two operations recur throughout the arithmetic. The first is truncation: for a polynomial \( Q \) we write \( Q_{\leq n} \) for the terms of total degree at most \( n \) and \( Q_{>n} \) for the rest. The second is range bounding: for a polynomial \( Q \) we write \( B(Q) \) for an interval enclosing the values of \( Q \) over the domain

\begin{equation} \normalsize B(Q) \supseteq \left\{ Q(\delta) : \delta \in [-1, 1]^v \right\} \label{eq:tm-bound} \end{equation}

Any valid \( B \) makes the arithmetic below correct, but a sharper \( B \) makes it more useful. The requirement is that \( B \) be at least as sharp as evaluating \( Q \) directly in interval arithmetic. Sigma's current implementation is Berz and Makino's quadratic fast bounder (QFB): it bounds each variable's own linear and quadratic contribution exactly, in closed form, and falls back to evaluating every other term separately in Interval arithmetic for the rest. The rest of this section builds up to that implementation — the naive per-term baseline it falls back on, an alternative (Horner form) that was considered and rejected, and QFB itself.

Naive baseline

The simplest valid \( B \) substitutes \([-1,1]\) for every expansion variable, evaluates each monomial's power via Interval's pow, multiplies by its coefficient, and sums the resulting intervals term by term. It is cheap and always valid, but it is not tight, because it is susceptible to the classic interval-arithmetic dependency problem: if the same variable appears in more than one term, each occurrence is bounded independently, so the bound implicitly (and wrongly) allows different occurrences of the same symbol to take different values at once. This naive evaluation is still what Sigma's actual implementation, described below, falls back to for whatever it cannot bound exactly.

A minimal example makes this concrete. Multiply two order-1 models with independent expansion variables, \(x = 2 + \delta_x\) (representing \(x \in [1,3]\)) and \(y = 3 + \delta_y\) (representing \(y \in [2,4]\)); the exact product expands to

\begin{equation} \normalsize P(\delta_x, \delta_y) = 6 + 3\delta_x + 2\delta_y + \delta_x \delta_y \label{eq:tm-bound-example} \end{equation}

The true range of Eq. \(\eqref{eq:tm-bound-example}\) over the box \([-1,1]^2\) is \([2, 12]\) (a bilinear function's extrema occur at the box's corners; e.g. \(\delta_x = \delta_y = -1 \Rightarrow 6-3-2+1=2\), matching \(x=1, y=2 \Rightarrow xy=2\)). The naive baseline instead computes \(6 + [-3,3] + [-2,2] + [-1,1] = [0, 12]\): loose on the lower end, because it sums the \(-3\) attained by \(3\delta_x\) at \(\delta_x = -1\) with the \(-1\) attained by \(\delta_x\delta_y\) at \(\delta_x = 1, \delta_y = -1\) — the opposite sign of \(\delta_x\) — as if both could hold at once. This is exactly what computing bound(x * y) for Taylor(1,3) * Taylor(2,4) returns today.

Horner form

A tighter option for a univariate polynomial is to evaluate it in nested (Horner) form,

\begin{equation} \normalsize P(\delta) = c_0 + \delta\left(c_1 + \delta\left(c_2 + \cdots + \delta\, c_n\right)\right) \label{eq:tm-horner} \end{equation}

substituting a single \([-1,1]\) interval and reusing that same interval object at every nesting level, rather than computing each power independently. This reduces the dependency problem — reusing one interval through repeated multiplication is tighter than bounding \(c_k\delta^k\) separately for every \(k\) — but it does not eliminate it: a polynomial whose terms cancel, such as \(\delta - \delta\), still evaluates to \([-1,1] - [-1,1] = [-2,2]\) rather than the true value \(0\), because the two occurrences of \(\delta\) are still bounded as if independent.

More importantly for Sigma, Horner form is naturally a single-variable nesting: it has no canonical generalization to a sparse polynomial over arbitrarily many expansion variables, the way \(P\) in Eq. \(\eqref{eq:tm-poly}\) is. That mismatch is why Sigma looked to Berz and Makino's dominated and fast bounders instead.

Dominated and fast bounders

Berz and Makino's survey (linked above) describes a family of sharper bounders, each splitting \(P = L + R\) so that \(L\), some low-order part of \(P\), is bounded exactly, leaving only the (typically smaller, higher-order) remainder \(R\) for the naive fallback above. The linear dominated bounder (LDB) takes \(L\) to be \(P\)'s constant and linear ( \(|\beta| \leq 1\)) part; because each \(\delta_i\) appears exactly once in \(L\), its exact range over \([-1,1]^v\) has a closed form with zero dependency-problem overestimation

\begin{equation} \normalsize B_{\mathrm{LDB}}(P) = \left[c_0 - \sum_i \left|c_{e_i}\right|,\;\; c_0 + \sum_i \left|c_{e_i}\right|\right] + B(R) \label{eq:tm-ldb} \end{equation}

Sigma implements the next refinement in the family, the quadratic fast bounder (QFB), directly (Taylor::bound()), rather than LDB itself: it extends \(L\) one degree further, to each variable \(\delta_i\)'s diagonal contribution \(c_{e_i}\delta_i + c_{2e_i}\delta_i^2\) (the linear and pure-quadratic terms in \(\delta_i\) alone). That diagonal contribution still has an exact, closed-form extremum over \(\delta_i \in [-1,1]\), found by completing the square: the parabola's vertex, clipped to \([-1,1]\), or an endpoint if the vertex falls outside it. Summing these exact per-variable extrema still incurs no cross-variable dependency-problem overestimation, since each is evaluated on its own independent \(\delta_i\); only cross-quadratic and degree- \(\geq 3\) terms are left in \(R\), bounded by the naive fallback described above — which is exactly why the x*y example there still comes out to \([0,12]\) under QFB: neither \(\delta_x\) nor \(\delta_y\) has a pure-quadratic term of its own, so QFB's diagonal split captures nothing there and the whole product falls to the naive fallback, unchanged. LDB itself was never implemented, since QFB is a strict refinement of it and was adopted directly.

Arithmetic

Addition and subtraction act independently on the two parts, since both are linear

\begin{equation} \normalsize \left(P_1, I_1\right) + \left(P_2, I_2\right) = \left(P_1 + P_2,\; I_1 + I_2\right) \label{eq:tm-add} \end{equation}

Multiplication is where the design shows itself. The exact product of two order- \( n \) polynomials has order \( 2n \), so it does not fit the representation and must be split. The low-order part is kept as the new polynomial, and everything else — the truncated tail, the cross terms between each polynomial and the other's remainder, and the product of the remainders — is bounded into the new remainder

\begin{equation} \normalsize \left(P_1, I_1\right) \cdot \left(P_2, I_2\right) = \left( \left(P_1 P_2\right)_{\leq n},\; B\left(\left(P_1 P_2\right)_{>n}\right) + B\left(P_1\right) I_2 + B\left(P_2\right) I_1 + I_1 I_2 \right) \label{eq:tm-mul} \end{equation}

Eq. \(\eqref{eq:tm-mul}\) is worth reading against the corresponding affine result. Affine multiplication also produces a quadratic term it cannot store, and also bounds it with a single scalar. The difference is that a Taylor model of order \( n \geq 2 \) keeps the quadratic term as an explicit coefficient and only bounds what lies above order \( n \). Raising the order moves the boundary between "tracked exactly" and "bounded", and the remainder shrinks accordingly.

Note also what Eq. \(\eqref{eq:tm-mul}\) does not do: it never discards the tail. The truncated terms are bounded into \( I \), so Eq. \(\eqref{eq:tm-inclusion}\) survives the operation. This is precisely the discipline that ThresholdedAffine pruning gives up.

Division is not a primitive operation. As in the affine case, it is composed from multiplication and the multiplicative inverse, so only the inverse needs a definition, and it is supplied by the intrinsic machinery below.

Elementary functions

Recall \( f \) from the definition of the Taylor model above: it is the function that \( (P, I) \) models, expanded about \( x_0 \). This section builds a Taylor model of the composition \( g(f) \) for an elementary function \( g \) such as \( \exp \), \( \log \), or \( \sqrt{\cdot} \); \( g \) is called the outer function because it is applied on the outside of \( f \), and \( f \) itself — the Taylor-model-valued argument — is the inner one.

All elementary functions follow one recipe. Split the polynomial's constant part, writing \( c_f \) for the value of \( f \) at the expansion point \( x_0 \) — equivalently, the coefficient of the \( \beta = 0 \) term of \( P \), since that is what a Taylor polynomial's constant term always is — and \( \bar{P} = P - c_f \) for the rest of the polynomial, so that \( (\bar{P}, I) \) is a Taylor model of \( \bar{f} = f - c_f \). Then Taylor-expand the outer function \( g \) about \( c_f \)

\begin{equation} \normalsize g(f) = \sum_{k=0}^{\infty} \frac{1}{k!} \frac{d^{k} g}{d f^{k}}\left(c_f\right) \bar{f}^{\,k} \label{eq:tm-outer-series} \end{equation}

Eq. \(\eqref{eq:tm-outer-series}\) is evaluated using Taylor model arithmetic, i.e. Eq. \(\eqref{eq:tm-add}\) and Eq. \(\eqref{eq:tm-mul}\), with \( \bar{f} \) represented by the Taylor model \( (\bar{P}, I) \).

The reason this terminates cleanly is a small observation with large consequences. Because \( \bar{P} \) has no constant term, every one of its monomials has degree at least 1, so a product of \( k \) of them — which is what \( \bar{P}^k \) expands into — has degree at least \( k \) as well: \( \bar{P}^k \) has no terms of degree below \( k \). Put another way, raising \( \bar{P} \) to a higher power pushes its lowest surviving degree higher, i.e. its terms climb up out of the truncation window as \( k \) grows. So for \( k > n \) the polynomial part of \( \bar{P}^k \) vanishes entirely under truncation, and every term of the outer series beyond order \( n \) contributes to the remainder only. The series therefore splits exactly into a finite polynomial computation plus an interval.

Splitting Eq. \(\eqref{eq:tm-outer-series}\) at \( k = n \) makes this precise

\begin{equation} \normalsize g(f) = \sum_{k=0}^{n} \frac{1}{k!} \frac{d^{k}g}{df^{k}}\left(c_f\right) \bar{f}^{\,k} + R_n \label{eq:tm-outer-split} \end{equation}

The first term is exactly the truncated polynomial part identified above, so it is computed by repeated Taylor model addition and multiplication, i.e. Eq. \(\eqref{eq:tm-add}\) and Eq. \(\eqref{eq:tm-mul}\). The second term, \( R_n \), is the Lagrange form of the remainder; since its polynomial part vanishes under truncation, it need not be tracked as a polynomial at all, only bounded, which interval arithmetic does directly by letting \( \xi \) range over the whole enclosure of \( f \)

\begin{equation} \normalsize R_{n} \in \frac{1}{\left(n+1\right)!} \left(B\left(\bar{P}\right) + I\right)^{n+1} \frac{d^{n+1}g}{df^{n+1}}\Big( c_f + \left[0, 1\right] \cdot \left(B\left(\bar{P}\right) + I\right) \Big) \label{eq:tm-outer-rem} \end{equation}

Taking the exponential as the worked example specializes Eq. \(\eqref{eq:tm-outer-split}\) and Eq. \(\eqref{eq:tm-outer-rem}\): every derivative of \( \exp \) is \( \exp \) itself, so \( \frac{d^{k}\exp}{df^{k}}\left(c_f\right) = \exp\left(c_f\right) \) for every \( k \), and the addition theorem together with the Taylor series of \( \exp \) give

\begin{equation} \normalsize \exp\left(f\right) = \exp\left(c_f\right) \left\{ 1 + \bar{f} + \frac{1}{2!}\bar{f}^{\,2} + \cdots + \frac{1}{n!}\bar{f}^{\,n} \right\} + R_{n} \label{eq:tm-exp} \end{equation}

where the braced expression is a polynomial in \( \bar{f} \), computed by repeated Taylor model addition and multiplication, and \( R_n \) collects the tail. The tail is bounded by the Lagrange form of the remainder, evaluated in interval arithmetic over the range of the argument

\begin{equation} \normalsize R_{n} \in \exp\left(c_f\right) \frac{1}{\left(n+1\right)!} \left(B\left(\bar{P}\right) + I\right)^{n+1} \exp\left(\left[0, 1\right] \cdot \left(B\left(\bar{P}\right) + I\right)\right) \label{eq:tm-exp-rem} \end{equation}

Eq. \(\eqref{eq:tm-exp-rem}\) is ordinary interval arithmetic on a quantity whose polynomial part is known to vanish, which is why the whole tail can be collapsed into a single interval without loss of validity.

Every other elementary function is the same computation with a different outer series and a different Lagrange bound. Several are reached indirectly through an addition formula chosen so that the inner argument has no constant part, which is what makes the vanishing-polynomial argument apply

function outer series precondition
\( \exp \) direct series, scaled by \( \exp(c_f) \) none
\( \log \) series in \( \bar{f}/c_f \) \( B(P) + I \subset (0, \infty) \)
\( 1/f \) alternating series in \( \bar{f}/c_f \) \( 0 \notin B(P) + I \)
\( \sqrt{f} \), \( 1/\sqrt{f} \) binomial series \( B(P) + I \subset (0, \infty) \)
\( \sin \), \( \cos \) addition theorem; remainder sign cycles with \( k \bmod 4 \) none
\( \sinh \), \( \cosh \) addition theorem none
\( \arcsin \) addition formula, then series in \( g = f\sqrt{1 - c_f^2} - c_f\sqrt{1 - f^2} \) \( B(P) + I \subset (-1, 1) \)
\( \arccos \) \( \pi/2 - \arcsin \) \( B(P) + I \subset (-1, 1) \)
\( \arctan \) addition formula, then series in \( g = \bar{f}/(1 + c_f f) \) none

The preconditions are genuine requirements, not conveniences. They are stated in terms of \( B(P) + I \) — the full enclosure including the remainder — because it is the enclosure, not the polynomial alone, that must avoid the singularity. An implementation must check them and throw, in the same manner as the corresponding Affine operations.

Antiderivation deserves a mention because it is nearly free and it is what makes verified integration possible. Integrating with respect to variable \( i \) raises every degree by one, so the order- \( n \) terms would overflow the truncation; they are bounded into the remainder instead

\begin{equation} \normalsize \partial_i^{-1}\left(P, I\right) = \left( \int_0^{\delta_i} P_{\leq n-1}\, d\delta_i,\; \left(B\left(P_{>n-1}\right) + I\right) \cdot w_i \right) \label{eq:tm-antideriv} \end{equation}

where \( w_i \) is the width of the domain in the \( i \)-th variable. Note that Eq. \(\eqref{eq:tm-antideriv}\) is stated for \((P, I)\), i.e. it belongs to TaylorModel, where the overflowing terms have a remainder to be bounded into, but TaylorModel's antiderivative is not implemented (only sweep_to_order and sweep_small are, of the members "Achieving rigorous bounds" below describes). Taylor alone has no remainder to bound into either way, and nothing else on this page depends on antiderivation — elementary functions need only compose_ plus Taylor model addition and multiplication (Eq. \(\eqref{eq:tm-add}\), Eq. \(\eqref{eq:tm-mul}\)) — so it was left out of Taylor's implementation and can be added later, alongside TaylorModel, if verified integration is actually needed.

Order scaling

The payoff is a theorem about how fast the remainder shrinks. Suppose the inputs to a computation are Taylor models over a domain of width \( h \) whose remainders are \( O(h^{n+1}) \). Then the remainders of their sums, their products, and the results of every elementary function above are also \( O(h^{n+1}) \)

\begin{equation} \normalsize I_{f+g} = O\left(h^{n+1}\right) \qquad I_{f \cdot g} = O\left(h^{n+1}\right) \qquad I_{s(f)} = O\left(h^{n+1}\right) \label{eq:tm-scaling} \end{equation}

Eq. \(\eqref{eq:tm-scaling}\) is the \( (n+1) \)-st order scaling property, and it holds for whole computations, not merely single operations, because the property is preserved by composition. It is the precise sense in which the progression of these three pages is an improvement

representation overestimation
Interval \( O(h) \)
Affine \( O(h^2) \)
order- \( n \) TaylorModel \( O(h^{n+1}) \)

The three rows are one formula evaluated at \( n = 0 \), \( n = 1 \), and general \( n \). Halving the domain reduces interval overestimation by a factor of two and affine overestimation by four; for an order-5 model it falls by a factor of 64.

Design of the Taylor class

The design separates the polynomial algebra from the rigorous enclosure, giving two classes that compose in the same way Affine and ThresholdedAffine do. Taylor implements Eq. \(\eqref{eq:tm-poly}\) — a truncated polynomial and nothing else. It is cheap, it is useful on its own for sensitivity analysis and automatic differentiation, and it makes no claim to enclose anything. TaylorModel pairs a Taylor with a remainder interval and maintains Eq. \(\eqref{eq:tm-inclusion}\).

Three requirements shaped the design. The truncation order must be per object, so that different quantities in the same program can carry different orders; the class must work for any floating-point type, following the ValueType template parameter used everywhere else in Sigma; and there must be no global state. These are the reasons Sigma implements its own rather than binding to an existing differential algebra library — DACE, the most mature option, fixes one truncation order and variable count process-wide through a global initialization call and is not templated on the scalar type.

Internal state

using size_type = std::size_t;
using value_t = ValueType;
using deviation_t = size_type; // opaque, like error_term_t
using monomial_t = Monomial; // sparse exponent multi-index
using coeffs_t = std::map<monomial_t, value_t>;
using interval_t = Interval<value_t>;
std::optional<value_t> m_constant_; // nullopt when empty, as in Affine
coeffs_t m_coeffs_; // non-constant terms only
size_type m_order_; // per-object truncation order

The constant term is stored apart from the rest because every elementary function in the table above begins by splitting it off. Holding it in a std::optional and letting an empty optional denote the empty set follows Affine exactly, so empty and a private assert_not_empty_ helper carry over unchanged.

The multi-index type deserves its own small class. Expansion variables are minted dynamically and a given model touches only a few of them, so a dense exponent vector would be mostly zeros; monomial_t should instead wrap a sparse map from variable to exponent and provide comparison, hashing, total degree, and multi-index addition. Isolating it gives one place to test the index algebra, which is otherwise easy to get subtly wrong.

The coefficient container is deliberately a std::map rather than the std::unordered_map that Affine uses for its error terms. A Taylor model carries far more terms than an affine form, and summing them in a deterministic order — which an ordered container guarantees and a hash container does not — keeps results reproducible across runs and platforms.

Expansion variables are minted exactly as affine error symbols are, by a static make_deviation returning successive values from a function-local std::atomic counter. Sharing a variable between two models is what expresses correlation, so global uniqueness matters here for the same reason it does for the error symbols of the affine representation.

Interface

Taylor should mirror the Affine surface — the compound-assignment and free arithmetic operators in both scalar and same-type overloads, unary negation, equality, range, contains, empty, stream insertion, an eigen_compat.hpp, and TFloat/TDouble typedefs. Beyond that it adds

member purpose
order the truncation order of this object
constant \( c_f \), the order-0 coefficient
coefficients, n_terms access to Eq. \(\eqref{eq:tm-poly}\)
bound \( B(P) \) of Eq. \(\eqref{eq:tm-bound}\)
derivative ordinary term-by-term polynomial differentiation
truncate drop terms above a given order
make_deviation mint a fresh expansion variable

One hook carries the weight of every nonlinear operation, and it is the direct generalization of the affine apply_affine_transform. Where the affine version takes two coefficients and one lumped error radius, its Taylor counterpart takes the outer function's Taylor coefficients about \( c_f \)

// Affine: alpha, zeta (a linear model) + delta (everything else)
// Taylor: n+1 outer coefficients about c_f; the tail becomes the remainder
my_t compose_(const std::vector<value_t>& outer_coeffs) const;

Every entry in the elementary function table then reduces to building a coefficient list and calling compose_, so the operations headers become tables of series coefficients rather than bespoke derivations. Following the existing layout, operations/exponents.{hpp,ipp} would cover the exponential, logarithm, root, and power functions, with a new operations/trigonometry.{hpp,ipp} for the trigonometric, hyperbolic, and inverse families. As in Affine, pow should be composed from log and exp rather than given its own series.

A constructor taking a center and an order collides with the constructor taking a lower and upper bound, since an integer literal converts to either parameter type. ThresholdedAffine already solves this problem for its threshold, and the same tag-type approach applies

struct Order {
size_type value;
explicit Order(size_type v) : value(v) {}
};
static constexpr Order default_order() { return Order(2); }

with Order supplied as a trailing defaulted argument on each constructor.

Achieving rigorous bounds

TaylorModel holds a Taylor and an interval_t, and guarantees Eq. \(\eqref{eq:tm-inclusion}\) for every \( \delta \in [-1,1]^v \). Structurally it follows ThresholdedAffine: composition rather than inheritance, forwarding accessors, an accessor exposing the underlying polynomial, a constructor that re-wraps a polynomial and a remainder, mutating operators that delegate and then repair the remainder, and free-function elementary operations at the bottom of the same header rather than in an operations subdirectory.

The arithmetic is Eq. \(\eqref{eq:tm-add}\) and Eq. \(\eqref{eq:tm-mul}\); the elementary functions are compose_ followed by the appropriate Lagrange interval, as in Eq. \(\eqref{eq:tm-exp-rem}\). Two members have no affine analogue, and they are what close the gap left by ThresholdedAffine.

sweep_to_order reduces the polynomial to a lower order by bounding the removed terms with \( B \) and adding that interval to the remainder. sweep_small does the same for individual terms whose contribution falls below a threshold. Both serve the purpose that affine thresholding serves — controlling how many terms are carried — but because the removed contributions are bounded into \( I \) rather than deleted, Eq. \(\eqref{eq:tm-inclusion}\) still holds afterward. The enclosure gets wider, never invalid. That is the correct trade, and it is available only because the representation has somewhere to put what it gives up.

Two points require care in any implementation.

Mixed orders resolve downward. Combining an order- \( n_1 \) model with an order- \( n_2 \) model yields order \( \min(n_1, n_2) \). Higher-order information about the lower-order operand does not exist and cannot be manufactured, so the excess terms of the higher-order operand must be swept into the remainder exactly as sweep_to_order does. Dropping them instead would break Eq. \(\eqref{eq:tm-inclusion}\) — the same failure mode as unbounded pruning.

Floating-point rounding is a separate concern. Eq. \(\eqref{eq:tm-inclusion}\) speaks of exact real arithmetic. An implementation that computes coefficients in ordinary floating-point arithmetic commits rounding errors that the remainder does not account for, so the result is rigorous with respect to the modeled uncertainty but not with respect to its own computation. Affine has the same limitation and documents it. Closing the gap requires either outward-rounded coefficient arithmetic or a rounding budget accumulated into the remainder; the design should leave a hook for it rather than imply a guarantee that is not yet delivered.

Future work

Three areas are known to be open.

Rigor with respect to rounding, as just described, is the most significant. Until it is addressed, TaylorModel should be documented as enclosing the modeled function under exact arithmetic.

Sharper range bounding would still improve every operation, since \( B \) appears throughout Eq. \(\eqref{eq:tm-mul}\), Eq. \(\eqref{eq:tm-exp-rem}\), and Eq. \(\eqref{eq:tm-antideriv}\). "Truncation and range bounding" above walks through the naive baseline, and Sigma's quadratic fast bounder (QFB), which now bounds every polynomial's diagonal linear and quadratic terms exactly. What's left is what QFB leaves to the naive fallback: cross terms and terms of degree \(\geq 3\). Extending the same exact-bounding idea to cross terms is the natural next refinement.

Term count grows combinatorially. A model of order \( n \) in \( v \) variables admits

\begin{equation} \normalsize \binom{n + v}{n} \label{eq:tm-terms} \end{equation}

monomials, so both order and variable count are expensive. Eq. \(\eqref{eq:tm-terms}\) is the reason sweep_small exists, and choosing a policy for when to sweep is likely to need empirical tuning against real computations rather than a fixed default.

When the implementation lands it should live in include/sigma/taylor/ with tests under tests/unit_tests/taylor/, mirroring the existing layout. No build-system changes are required — the CMaize configuration globs headers and test sources recursively — and the only existing file needing modification is include/sigma/sigma.hpp, which must include the new header to export the classes.