Reduction-tree error enclosure #
A binary tree records the parenthesization of a rounded sum. Under the explicit local
RelativeLocalAddBound hypothesis, every such tree satisfies the same leaf-count and
absolute-leaf-scale error enclosure. The argument is independent of a floating-point format.
We retain the array-facing schedule API and use FloatLib's generic reduction-tree error bound.
Binary32 does not satisfy the relative bound globally over arbitrary real operands. The separate
IEEE32 module also provides tree-local corollaries: addition of representable operands inherits
FloatLib's usual unit-roundoff bound whenever every intermediate sum is finite.
Generic reduction trees over $\mathbb{R}$ #
A binary reduction schedule.
Leaves contain inputs of type α; internal nodes indicate “evaluate left and right subtrees, then
combine”. Different trees represent different valid parenthesizations for a parallel reduction.
Instances For
Instances For
Number of leaves in the tree (the “reduction length”).
Instances For
Growth factor (1+u)^(n-1) for a reduction with n leaves.
Instances For
Evaluate a reduction tree using a given “rounded add” at internal nodes.
evalRound roundAdd leafVal t maps leaves via leafVal, and combines subresults using
roundAdd. This abstracts the idea of evaluating a parallel sum with a fixed local rounding model.
Instances For
Relative local rounded-addition assumption for reductions.
This is the usual normal-range unit-roundoff envelope: $$ \operatorname{roundAdd}(a,b)=(a+b)+e, \qquad |e|\le u(|a|+|b|). $$ Binary32 does not satisfy it globally with $u=2^{-24}$: subnormal results require an absolute-error term. The executable theorems below take this global predicate as an explicit hypothesis. Normal-range evidence for one evaluation tree cannot establish a bound quantified over all real operands. Applying a normal-range analysis to a particular tree requires a tree-local hypothesis; handling underflow requires an absolute/mixed analysis.
Instances For
Preserve the schedule when reusing FloatLib's reduction theorems.
Instances For
Order-independent enclosure for any reduction tree evaluated with roundAdd.
Let $A=\sum_i|\mathtt{leaf}_i|$ be the sum of absolute values of leaves. For $n$ leaves, the rounded evaluation is within $(\operatorname{growth}(u,n)-1)A$ of the exact real sum.