arXiv reader

Dekker’s floating point number system and compensated summation algorithms

Longfei Gao and Frimpong Baidoo

arXiv
2602.19452v1 · PDF · 23 February 2026
Categories
math.NA, cs.NA
Licence
CC BY 4.0 The site shows the text.

Abstract

The recent hardware trend towards reduced precision computing has reignited the interest in numerical techniques that can be used to enhance the accuracy of floating point operations beyond what is natively supported for basic arithmetic operations on the hardware. In this work, we study the behavior of various compensated summation techniques, which can be used to enhance the accuracy for the summation operation, particularly in situations when the addends are not known a priori. Complete descriptions of the error behavior are provided for these techniques. In particular, the relationship between the intermediate results at two consecutive summing steps is provided, which is used to identify the operation that limits accuracy and guide the design of more nuanced techniques. The analysis relies on the work of Dekker [Numerische Mathematik, 1971], which uses a special floating point number system that does not require uniqueness in the number representation. Despite this seemingly strange attribute, Dekker’s system is very convenient for the analysis here and allows general statements to be expressed succinctly compared to a number system that requires uniqueness. To prepare the foundation for discussion, we start by giving a thorough exhibition of Dekker’s number system and supply the details that were omitted in Dekker [Numerische Mathematik, 1971]. Numerical examples are designed to explain the inner workings of these compensated summation techniques, illustrate their efficacy, and empirically verify the analytical results derived. Discussions are also given on application scenarios where these techniques can be beneficial.

Items 34

Lemma

Lemma 2.1 (Normal representation is unique)

J3ML

A number from Dekker’s system can admit at most one normal representation.

Proof.

Suppose m(a) \times \beta^{e(a)} and m(b) \times \beta^{e(b)} are two distinct normal representations.

If e(a) = e(b) but m(a) \neq m(b), it is obvious that these two representations cannot represent the same number.

If e(a) \neq e(b), without loss of generality, assume m(a)>0, m(b)>0, and e(a) < e(b).

On one hand, we have

m(a) \times \beta^{e(a)} < \beta^t \times \beta^{e(a)}

following m(a) < M.

On the other hand, we have

m(b) \times \beta^{e(b)} \geq \beta^{t-1} \times \beta^{e(b)} \geq \beta^t \times \beta^{e(a)}

following the normal assumption.

Combining the two inequalities, we have m(b) \times \beta^{e(b)} > m(a) \times \beta^{e(a)} and, thus, the two representations cannot possibly represent the same number.

End of proof for Lemma lemma:NormalRepresentationIsUnique.

Remark

Remark 1 (Subnormal numbers)

JO53

Historically, with certain hardware and compilers, the default behavior regarding subnormal numbers is treat as zero on input and flush to zero on output, forfeiting the gradual underflow design from the IEEE standard.

Operations involving subnormal numbers often incur heavy performance penalty as they are handled via microcode offloading.

However, for reduced precision data formats, it is important to give subnormal numbers the proper treatment in hardware since they occupy a large portion of the number system and often cover an even larger portion of the representable range.

Interested readers may find more discussions on the merit of subnormal numbers in [overton2025numerical, Appendix A] and [demmel1984underflow].

End of Remark rmk:subnormal_importance_and_practice.

Remark

Remark 2 (Inf and NaN in IEEE system)

I9HC

The reason we refer to (?) as the proto-IEEE system, rather than simply the IEEE system, is that the IEEE system includes special members \pm \texttt{Inf} and \texttt{NaN}’s as extensions to numbers. The former are used to handle overflow and the later are used to handle invalid arithmetic operations such as \nicefrac{0}{0} and \sqrt{-1}.

In the IEEE system, representations with the largest exponent are dedicated to these extensions.

End of Remark rmk:proto-IEEEnumberSystem.

Lemma

Lemma 2.3

AXO1

The two number sets from Dekker’s system (?) and the proto-IEEE system (?) are equivalent.

Proof. Imagine a process of adding numbers to these two sets bin by bin.

For the first bin E_{\min}, Dekker’s system has the following numbers

\left\{ x \,\vert\, x = m(x) \times \beta^{E_{\min}},\, \vert m(x)\vert < \beta^t \right\};

the proto-IEEE system has the following numbers

\left\{ x \,\vert\, x = m(x) \times \beta^{E_{\min}},\, \beta^{t-1} \leq \vert m(x) \vert < \beta^t \right\} \union \left\{ x \,\vert\, x = m(x) \times \beta^{E_{\min}},\, \vert m(x) \vert < \beta^{t-1} \right\}.

Clearly the two sets (?) and (?) are the same.

Assuming the two systems contain the same numbers up to bin E.

For bin E+1, Dekker’s system introduces the following numbers

\left\{ x \,\vert\, x = m(x) \times \beta^{E+1},\, \beta^{t-1} \leq \vert m(x)\vert < \beta^t \right\} \union \left\{ x \,\vert\, x = m(x) \times \beta^{E+1},\, \vert m(x)\vert < \beta^{t-1} \right\}.

The first set of (?) is the same as the bin E+1 introduced by the proto-IEEE system;

the second set of (?) can be written as \left\{ x \,\vert\, x = \big( m(x) \cdot \beta \big) \times \beta^{E},\, \vert m(x) \cdot \beta \vert < \beta^{t} \right\}, which has already been introduced by the previous bins.

Therefore, the two systems contain the same numbers up to bin E+1.

By induction, the result stated in the lemma follows.

End of proof for Lemma lemma:equivalence_Dekker_proto-IEEE.

Remark

Remark 3 (Nonuniqueness)

IMVE

Admitting nonunique representations in a number system may appear uncomfortable at first sight, but in fact, even the IEEE system contains nonunique representations in the special case of zero, which has two representations with different sign bits.

In Dekker’s system, there are two such zeros in each bin.

The IEEE standard [IEEE2019standard, Section 6.3] defines special rules to determine the sign of zero when ambiguity may arise. However, these are rather technical aspects that do not concern this work.

End of Remark rmk:nonuniqueness.

Definition

Definition 2.4 (Faithful)

PEEH

For x \in \mathbb R, rounding is faithful if fl(x) \in \mathbb F is either the largest element of \mathbb F no larger than x or the smallest element of \mathbb F no smaller than x. As a consequence, if x \in \mathbb F, then fl(x) = x under faithfulness.

Used by Lemma 2.14
Definition

Definition 2.5 (Optimal)

JLXU

For x \in \mathbb R, rounding is optimal if fl(x) \in \mathbb F is the nearest element to x.

Optimal rounding may also be referred to as nearest rounding.

Remark

Remark 4 (Tie-breaking)

8NCJ

Nearest rounding with the tie-breaking criterion of rounding to even last mantissa digit is the default rounding mode for binary formats in the IEEE standard [IEEE2019standard, Section 4.3] and is prevalently supported on hardware.

It may not always be possible to round to a number with even last mantissa digit such as in the extreme case when t=1. A fallback criterion such as rounding away from zero may be used in such situations as suggested by the IEEE standard.

In Dekker’s system, rounding to even or odd last mantissa digit can be ambiguous because the same number may admit representations with both even and odd last mantissa digit, e.g., both 100 \times \beta^{-2} and 001 \times \beta^{0} from the system illustrated in Figure ? represent the same number.

To remove this ambiguity, given x \in \mathbb R, tie-breaking should be performed on a representation of x that has t whole digits either with a non-zero leading digit or with exponent E_{\min}, possibly both.

Using the illustration in Figure ?, this simply means when x can be enclosed in multiple intervals \left[000, 111\right) \times \beta^E, where E_{\min} \leq E \leq E_{\max}, tie-breaking, and rounding in general, should be performed on a representation of x with the smallest exponent E possible.

This procedure will also deliver the rounding outcome consistent with the proto-IEEE system under nearest rounding with the same tie-breaking criterion.

In the following, when referring to tie-breaking with rounding to even or odd in Dekker’s system, the above procedure is implied and, more generally, the consistency of rounding outcome between Dekker’s system and the proto-IEEE system is assumed.

For tie-breaking criterions that bias towards a direction, there is no ambiguity in Dekker’s system and the rounding outcome is consistent between the two systems.

End of Remark rmk:tie-breaking-ambiguity.

Rule

Rule 2.6 (The as if rule)

ZSIF

The floating point arithmetic operation under consideration are performed as if an intermediate result correct to infinite precision and with unbounded range has been produced first, and then rounded to fit the destination format.

Lemma

Lemma 2.7 (Symmetry)

W2QI

Assume \mathbb F is symmetric, i.e.,

the negative of any element of \mathbb F is also in \mathbb F.

Then \forall x \in \mathbb R, we have fl(-x) = -fl(x) under nearest rounding with a tie-breaking criterion that is consistent between the rounding of -x and x.

Such tie-breaking criteria include rounding to even or odd last mantissa digit or rounding towards or away from zero.

Proof.

For the special case x=0, we have fl(x) = 0 since 0 \in \mathbb F and the relation fl(-x) = -fl(x) clearly holds.

When x \neq 0, we need only to consider the case x>0 because both \mathbb R and \mathbb F are symmetric.

In this case, we have

\vert fl(x) - x \vert \leq \vert a - x \vert,\, \forall a \in \mathbb F

under nearest rounding, and hence

\left\vert \big(-fl(x)\big) - (-x) \right\vert \leq \vert (-a) - (-x) \vert,\, \forall (-a) \in \mathbb F.

In other words, -fl(x) is either the closest element in \mathbb F to -x, in which case we have fl(-x) = -fl(x) by the definition of nearest rounding, or one of the two closest elements when -x lies at the exact middle of two adjacent elements of \mathbb F.

In the later scenario, fl(-x) = -fl(x) follows the consistency in the tie-breaking criterion.

End of proof for Lemma lemma:Symmetry.

Used by Lemma 2.8
Lemma

Lemma 2.8 (Monotonicity)

H7IP

For x, y \in \mathbb R, if \vert x \vert \leq \vert y \vert, then \vert fl(x) \vert \leq \vert fl(y) \vert under nearest rounding.

Proof. We need only to consider the case 0 \leq x \leq y since, according to Lemma 2.7, rounding is symmetric under nearest rounding.

Moreover, if x=y, then fl(x)=fl(y) since rounding leads to unique outcome. The result stated in this lemma clearly holds in this case.

Therefore, we can further restrict ourselves to considering only 0 \leq x < y.

By the definition of nearest rounding, we have

\begin{align} \vert fl(x) - x \vert & \leq \vert a - x \vert, \, \forall a \in \mathbb F; \\ \vert fl(y) - y \vert & \leq \vert b - y \vert, \, \forall b \in \mathbb F, \end{align}

and, consequently,

\vert fl(x) - x \vert + \vert fl(y) - y \vert \leq \vert a - x \vert + \vert b - y \vert, \, \forall a,b \in \mathbb F.

We proceed by contradiction in the separate cases below.

Adjustwidth.

1.5em

kwdcolorCase 1: if fl(x) > fl(y) \geq x, this kwdcolorcontradicts with (?) as fl(y) is strictly closer to x than fl(x).

kwdcolorCase 2(a): if fl(x) > fl(y), fl(y) < x, and fl(x) \leq y, this kwdcolorcontradicts with (?) as fl(x) is strictly closer to y than fl(y).

kwdcolorCase 2(b): if fl(x) > fl(y), fl(y) < x, and fl(x) > y, we have

\begin{aligned} \big(y - fl(y)\big) + \big(fl(x) - x\big) & = \big(y - x + x - fl(y)\big) + \big(fl(x) - y + y - x\big) \\ & = 2\cdot(y-x) + \big(x - fl(y)\big) + \big(fl(x) - y\big) \\ & > \big(x - fl(y)\big) + \big(fl(x) - y\big) \end{aligned}

following x<y, which kwdcolorcontradicts with (?).

The above cases cover all possible positions of fl(x) and fl(y) in relation to x and y, which all leads to contradiction if fl(x) > fl(y). Therefore, the result stated in this lemma must hold.

End of proof for Lemma lemma:Monotonicity.

Uses Lemma 2.7 · Used by Lemma 2.12, Lemma 3.3
Lemma

Lemma 2.9

PQD5

If \tilde z > 0 \in \mathbb R can be expressed as \tilde z = \zeta \times \beta^{e(z)} with \beta^{t-1} \leq \zeta \leq \beta^t and E_{\min} \leq e(z) < E_{\max}, then the number in \mathbb F closest to \tilde z is either \lfloor \zeta \rfloor \times \beta^{e(z)} or \lceil \zeta \rceil \times \beta^{e(z)}, where, for \zeta > 0 \in \mathbb R, \lfloor \zeta \rfloor and \lceil \zeta \rceil are defined as \lfloor \zeta \rfloor = \max \{ i \, \vert \, i \in \mathbb Z, i \leq \zeta \} and \lceil \zeta \rceil = \min \{ i \, \vert \, i \in \mathbb Z, i \geq \zeta \}, respectively.

Proof.

The conditions \beta^{t-1} \leq \zeta \leq \beta^t and E_{\min} \leq e(z) < E_{\max} ensure that both \lfloor \zeta \rfloor \times \beta^{e(z)} and \lceil \zeta \rceil \times \beta^{e(z)} are in \mathbb F.

Consider now an arbitrary w>0 in \mathbb F with a representation w = m(w) \times \beta^{e(w)}.

If e(w) < e(z), we have m(w) \times \beta^{e(w)} \leq (\beta^t - 1) \times \beta^{e(z)-1} < \beta^{t-1} \times \beta^{e(z)} \leq \lfloor \zeta \rfloor \times \beta^{e(z)} \leq \zeta \times \beta^{e(z)}. Therefore, \lfloor \zeta \rfloor \times \beta^{e(z)} is closer to \tilde z than w in this case.

If e(w) \geq e(z), we can write w = m(w) \cdot \beta^h \times \beta^{e(z)}, where h = e(w) - e(z) \geq 0 and, therefore, m(w) \cdot \beta^h \in \mathbb Z.

Since \lfloor \zeta \rfloor and \lceil \zeta \rceil are consecutive integers, we have either m(w) \cdot \beta^h \leq \lfloor \zeta \rfloor \leq \zeta or m(w) \cdot \beta^h \geq \lceil \zeta \rceil \geq \zeta.

Therefore, either \lfloor \zeta \rfloor \times \beta^{e(z)} or \lceil \zeta \rceil \times \beta^{e(z)} is closest to \tilde{z} in this case.

End of proof for Lemma 2.9.

Used by Lemma 2.11
Corollary

Corollary 2.10

4THJ

If \tilde z < 0 \in \mathbb R can be expressed as \tilde z = \zeta \times \beta^{e(z)} with - \beta^{t-1} \geq \zeta \geq - \beta^t and E_{\min} \leq e(z) < E_{\max}, then the number in \mathbb F closest to \tilde z is either - \lfloor - \zeta \rfloor \times \beta^{e(z)} or - \lceil - \zeta \rceil \times \beta^{e(z)}.

Lemma

Lemma 2.11

IZ5E

Under nearest rounding, given \tilde{z} \in \mathbb R and \vert \tilde{z} \vert \leq (M-1) \times \beta^{E_{\max}},

i.e., \tilde{z} does not overflow in Dekker’s system \mathbb D, if z = fl(\tilde{z}) admits a representation z = m(z) \times \beta^{e(z)}, then expressing \tilde{z} as \tilde{z} = \zeta \times \beta^{e(z)}, we have

m(z) = round(\zeta),

where round(\zeta) \in \mathbb Z gives the nearest integer to \zeta with a tie-breaking criterion, if needed, consistent with that used for fl(\tilde{z}).

Proof. It suffices to consider only the case \tilde{z} > 0 because both \mathbb R and \mathbb D are symmetric and the case \tilde{z} = 0 is trivial.

We start by showing that round(\zeta) \times \beta^{e(z)} \in \mathbb D. Since z = m(z) \times \beta^{e(z)} is a valid representation in \mathbb D, we have e(z) \in \left[ E_{\min} , E_{\max} \right].

Thus, we only need to show that round(\zeta) \leq M-1.

First, we consider the special case where e(z) = E_{\max}: the condition \vert \tilde{z} \vert \leq (M-1) \times \beta^{E_{\max}} implies that \zeta \leq M-1 and, therefore, we have round(\zeta) \leq M-1 as desired.

When e(z) < E_{\max}, we separate the discussion into three cases depending on the size of \zeta.

Adjustwidth.

1.5em

kwdcolorCase 1: if \zeta < M - \nicefrac{1}{2}, then we have the desired result round(\zeta) \leq M-1.

kwdcolorCase 2: if \zeta > M - \nicefrac{1}{2}, then we have \zeta - m(z) \geq \zeta - (M-1) > \vert \zeta - M \vert. In other words, M \times \beta^{e(z)} = \tfrac{M}{\beta} \times \beta^{e(z)+1} \in \mathbb D

is closer to \tilde{z} than any valid representation in \mathbb D with exponent e(z).

This contradicts the condition that z admits a representation in \mathbb D with exponent e(z) since M \times \beta^{e(z)} is not a valid representation itself.

Therefore, this is a null case.

kwdcolorCase 3: if \zeta = M - \nicefrac{1}{2}, then M-1 and M are the two closest integers to \zeta with equal distance.

Moreover, from Lemma 2.9,

we know that (M-1) \times \beta^{e(z)} and \tfrac{M}{\beta} \times \beta^{e(z)+1}

are the two floating point numbers in \mathbb D closest to \tilde{z} with equal distance.

Furthermore, the condition that z admits a representation with exponent e(z) implies that the tie-breaking criterion rounds \tilde{z} to (M-1) \times \beta^{e(z)} instead of \tfrac{M}{\beta} \times \beta^{e(z)+1}.

Since the tie-breaking criterion is assumed to be consistent when rounding \tilde{z} and \zeta,

we have round(\zeta) = M-1 as desired.

We now have established that round(\zeta) \times \beta^{e(z)} \in \mathbb D.

Next, we proceed to show that \tilde{z} indeed rounds to round(\zeta) \times \beta^{e(z)} by contradiction.

kwdcolorAssuming m(z) \neq round(\zeta), we have \vert m(z) - round(\zeta) \vert \geq 1 since they are different integers.

This leads to

\vert m(z) - \zeta \vert \geq \vert m(z) - round(\zeta) \vert - \vert \zeta - round(\zeta) \vert \geq 1 - \tfrac{1}{2} = \tfrac{1}{2},

where we have used \vert \zeta - round(\zeta) \vert \leq \tfrac{1}{2}.

If either \vert m(z) - \zeta \vert > \tfrac{1}{2} or \vert round(\zeta) - \zeta \vert < \tfrac{1}{2} holds, we have \vert m(z) - \zeta \vert > \vert round(\zeta) - \zeta \vert.

In other words, round(\zeta) \times \beta^{e(z)} would be closer to \tilde{z} than m(z) \times \beta^{e(z)}, which contradicts the condition that m(z) \times \beta^{e(z)} is a representation of fl(\tilde{z}).

The only remaining case is \vert m(z) - \zeta \vert = \tfrac{1}{2} =\vert round(\zeta) - \zeta \vert, which would contradict the condition that the tie-breaking criterion is consistent when rounding \tilde{z} and \zeta since \tilde{z} rounds to m(z) \times \beta^{e(z)} instead of round(\zeta) \times \beta^{e(z)}.

Hence, the kwdcolorassumption m(z) \neq round(\zeta) must be incorrect and (?) must hold.

End of proof for Lemma lemma:relationBetweenFloatingPointRoundingAndMantissaIntegerRounding.

Uses Lemma 2.9 · Used by Theorem 3.1
Lemma

Lemma 2.12

JKH8

Given x, y \in \mathbb D with e(x) \geq e(y) and z obtained via z = fl(x+y), then z admits a representation in \mathbb D with e(z) \leq e(x) + 1.

Proof. Since x, y \in \mathbb D and e(x) \geq e(y), we have

\vert x + y \vert \leq \vert x \vert + \vert y \vert \leq 2 \cdot \left( M - 1 \right) \times \beta^{e(x)} \leq \left( M - 1 \right) \times \beta^{e(x)+1}.

Using Lemma 2.8 (Monotonicity) and recognizing that \left( M - 1 \right) \times \beta^{e(x)+1} \in \mathbb D if e(x) < E_{\max}, we arrive at

\vert z \vert = \vert fl(x + y) \vert \leq \left( M - 1 \right) \times \beta^{e(x)+1}

in this case and, hence, z admits a representation in \mathbb D with e(z) \leq e(x) + 1.

If e(x) = E_{\max}, it is necessary that e(z) \leq e(x) and therefore the lemma still holds.

Overflow is not a special concern here because in Dekker’s system overflow leads to clipping. If overflow happens, it is necessary that e(x) = E_{\max} and z would take the value \left( M - 1 \right) \times \beta^{E_{\max}}.

End of proof for Lemma lemma:e(z)BoundFromAbove.

Uses Lemma 2.8 · Used by Theorem 3.1
Lemma

Lemma 2.13

5CR2

For x, y \in \mathbb D and z = fl(x+y), if z=x+y, i.e., there is no rounding error committed when forming z, then the subsequent operation z-x or z-y commits no rounding error either.

Proof. Since z=x+y, we have z-x=y \in \mathbb D, and, thus, fl(z-x)=fl(y)=y commits no rounding error. Similar argument can be made for z-y.

End of proof for Lemma lemma:z=x+yLeadsToExactSubtraction.

Used by Theorem 3.1
Lemma

Lemma 2.14

0166

For x, y \in \mathbb D and z = fl(x+y), assuming overflow does not happen, if x, y, and z admit representations in \mathbb D such that e(z) \leq min(e(x),e(y)), then z = x + y, i.e., the addition is exact.

Proof. We can express x+y as \zeta \times \beta^{e(z)}, where

\zeta = m(x) \cdot \beta^{e(x)-e(z)} + m(y) \cdot \beta^{e(y)-e(z)}.

Since e(x) \geq e(z) and e(y) \geq e(z), we have \zeta \in \mathbb Z.

If \vert \zeta \vert \geq M, \zeta \times \beta^{e(z)} cannot possibly round to a representation with exponent e(z).

To see this more clearly and without loss of generality, assuming \zeta \geq M, then \zeta \times \beta^{e(z)} would be closer to \frac{M}{\beta} \times \beta^{e(z)+1} than to any valid representation in \mathbb D with exponent e(z).

Thus, we have \vert \zeta \vert < M and hence x+y = \zeta \times \beta^{e(z)} \in \mathbb D. The statement in the lemma holds following faithful rounding.

End of proof for Lemma lemma:FergusonCounterpart.

Lemma

Lemma 2.15

EL6B

For x, y \in \mathbb D and z = fl(x+y), if z admits a representation with exponent E_{\min}, then z = x + y, i.e., the addition is exact.

Proof. For the representation of z with exponent E_{\min}, it is necessary that e(x) \geq e(z) and e(y) \geq e(z), hence, Lemma 2.14 applies.

End of proof for Lemma lemma:additionIsExactWhenEmin.

Used by Lemma 3.6
Theorem

Theorem 3.1 (3op EFT over addition in Dekker’s system)

C7EI

Under Rule 2.6 and nearest rounding, \forall x, y \in \mathbb D with e(x) \geq e(y), the following formulas achieve EFT z + zz = x + y:

\begin{align} z & = fl(x + y); \\ w & = fl(z - x); \\ zz & = fl(y - w). \end{align}

Proof. The gist of the proof below is to show that under the given conditions, neither (3.1) nor (3.1) commits rounding error.

Defining d, f, g \in \mathbb Z as follows,

\begin{align} d & = e(x) - e(y); \\ f & = e(x) - e(z); \\ g & = e(y) - e(z), \end{align}

we have d \geq 0 from the condition e(x) \geq e(y) of the theorem and the following equivalent ways of expressing x, y, and z:

\begin{alignat}{4} x & \enskip=\enskip & m(x) \times \beta^{e(x)} & \enskip=\enskip & m(x) \cdot \beta^{ d} \times \beta^{e(y)} & \enskip=\enskip & m(x) \cdot \beta^{ f} \times \beta^{e(z)} &; \\ y & \enskip=\enskip & m(y) \cdot \beta^{-d} \times \beta^{e(x)} & \enskip=\enskip & m(y) \times \beta^{e(y)} & \enskip=\enskip & m(y) \cdot \beta^{ g} \times \beta^{e(z)} &; \\ z & \enskip=\enskip & m(z) \cdot \beta^{-f} \times \beta^{e(x)} & \enskip=\enskip & m(z) \cdot \beta^{-g} \times \beta^{e(y)} & \enskip=\enskip & m(z) \times \beta^{e(z)} &. \end{alignat}

We note here that the above equalities are stated in \mathbb R rather than in \mathbb D because the mantissas may be out of range or no longer be integers.

From (?) and (?), we have

x + y = \left( m(x) \cdot \beta^f + m(y) \cdot \beta^g \right) \times \beta^{e(z)}.

Using Lemma 2.11, we have

m(z) = round \left( m(x) \cdot \beta^f + m(y) \cdot \beta^g \right).

We introduce

\zeta = m(x) \cdot \beta^f + m(y) \cdot \beta^g

to simplify the notation below.

We proceed by showing that (3.1), i.e., the calculation of w, commits no rounding error in all cases categorized by the signs of f and g.

From Lemma 2.12, we know that z admits a representation with e(z) \leq e(x) + 1 in Dekker’s system.

We choose to work with such a representation of z for the discussion below, which is needed (only) in Case 4.

Moreover, we assume that overflow does not happen when forming z in (3.1) for the cases below.

The special scenario of overflow is addressed immediately after the discussion of the cases below.

Adjustwidth.

1.5em

kwdcolorCase 1: if f \geq 0 and g \geq 0, we have \zeta \in \mathbb Z and, therefore, m(z) = \zeta.

In other words, z = x+y is formed without rounding error in (3.1).

According to Lemma 2.13, (3.1) also commits no rounding error.

kwdcolorCase 2: if f \geq 0 and g < 0, \zeta is no longer necessarily an integer.

From (?), we can write

z - x = \left( m(z) - m(x) \cdot \beta^f \right) \times \beta^{e(z)}.

Denoting \omega = m(z) - m(x) \cdot \beta^f, we have \omega \in \mathbb Z since f \geq 0

and

\begin{aligned} \left\vert \omega \right\vert & = \left\vert m(z) - m(x) \cdot \beta^f - m(y) \cdot \beta^g + m(y) \cdot \beta^g \right\vert \\ & \leq \left\vert round(\zeta) - \zeta \right\vert + \left\vert m(y) \cdot \beta^g \right\vert \\ & \leq \tfrac{1}{2} + \tfrac{M-1}{\beta} \leq \tfrac{M}{2}. \end{aligned}

We have \tfrac{M}{2} \leq M-1 if \beta \geq 2 and t \geq 1, which are satisfied for any natural floating point number system.

It follows that z - x = \omega \times \beta^{e(z)} \in \mathbb D, and hence w = fl(z-x) commits no rounding error.

kwdcolorCase 3: if f < 0 and g \geq 0, we have d = f - g < 0, which contradicts with the condition d \geq 0.

kwdcolorCase 4: if f < 0 and g < 0, recall that e(z) \leq e(x) + 1, we have f \geq -1 and, therefore, f=-1.

In general, we can write

z - x = \left( m(z) \cdot \beta^{-f} - m(x) \right) \times \beta^{e(x)}.

Denoting \omega = m(z) \cdot \beta^{-f} - m(x), we have \omega \in \mathbb Z and

\begin{align} \left\vert \omega \right\vert & = \left\vert m(z) \cdot \beta^{-f} - m(x) \cdot \beta^{f} \cdot \beta^{-f} - m(y) \cdot \beta^{g} \cdot \beta^{-f} + m(y) \cdot \beta^{g} \cdot \beta^{-f} \right\vert \\ & = \left\vert \left( m(z) - m(x) \cdot \beta^{f} - m(y) \cdot \beta^{g} \right) \cdot \beta^{-f} \right\vert + \left\vert m(y) \cdot \beta^{-d} \right\vert \\ & \leq \tfrac{1}{2} \cdot \beta + (M-1), \end{align}

where we have used f=-1 and d \geq 0 to arrive at (?).

So far, we have kept the discussion general with respect to \beta.

Here, we specialize to the case \beta=2, which leads to \vert\omega\vert \leq M following (?).

If \vert\omega\vert < M, then z - x = \omega \times \beta^{e(x)} is a valid representation in \mathbb D;

if \vert\omega\vert = M, then z - x = \text{sign}(\omega) \cdot \frac{M}{\beta} \times \beta^{e(z)} is a valid representation in \mathbb D. In both cases, we have w = fl(z - x) = z - x as desired.

We now address the special scenario of kwdcoloroverflow when forming z in (3.1), i.e., when \vert x + y \vert > (M-1) \times \beta^{E_{\max}}.

If f<0, i.e., Cases 3 and 4 above, this cannot happen because

\vert x+y \vert \leq 2 \cdot (M-1) \times \beta^{e(x)} \leq (M-1) \times \beta^{e(x)+1} \leq (M-1) \times \beta^{e(z)} \leq (M-1) \times \beta^{E_{\max}}.

If f \geq 0, i.e., Cases 1 and 2 above, overflow may happen in (3.1), which leads to \vert z \vert = (M - 1) \times \beta^{E_{\max}} in Dekker’s system.

Since f = e(x) - e(z) \geq 0, we have e(x) = E_{\max} as well.

Moreover, for overflow to happen, x and y must have the same sign.

Hence, x and z must also have the same sign.

Therefore, we have \vert m(z) - m(x) \vert < \vert m(z) \vert = M - 1 and that z - x = \big(m(z) - m(x) \big) \times \beta^{E_{\max}} is a valid representation in Dekker’s system.

To sum up, the claim that (3.1) commits no rounding error still holds when kwdcoloroverflow in z is considered.

We proceed to show that (3.1) also commits no rounding error under the conditions stated in the theorem.

We first note that for all cases discussed above, including the special case of overflow, w admits a valid representation in \mathbb D with an exponent at least e(y): in Case 1, we have w = y = m(y) \times \beta^{e(y)}; in Case 2, w admits a representation in (?) with exponent e(z), where e(z) > e(y) follows g > 0; Case 3 is a null case; in Case 4, w admits a representation in (?) with exponent e(x), where e(x) \geq e(y) follows d \geq 0; in the special case of overflow, w admits a representation \big(m(z) - m(x) \big) \times \beta^{E_{\max}}, where E_{\max} \geq e(y) by definition.

Therefore, we can work with a representation w = m(w) \times \beta^{e(w)}, where e(w) \geq e(y).

Introducing h = e(w) - e(y) \geq 0, we can write

w = m(w) \cdot \beta^h \times \beta^{e(y)}

and

y - w = \left( m(y) - m(w) \cdot \beta^h \right) \times \beta^{e(y)},

where m(y) - m(w) \cdot \beta^h \in \mathbb Z.

Moreover, we have

\begin{align} \vert y - w \vert & = \vert y - (z - x) \vert = \vert (x + y) - z \vert \\ & = \vert (x + y) - fl(x + y) \vert \leq \vert (x + y) - x \vert = \vert y \vert, \end{align}

where (?) used the just proved result that w = z -x and (?) used the nearest rounding property.

It follows that \vert m(y) - m(w) \cdot \beta^h \vert \leq \vert m(y) \vert \leq M - 1 and, therefore, y - w \in \mathbb D with (?) being a valid representation.

In other words, zz = fl(y - w) = y - w.

End of proof for Theorem 3.1.

Remark

Remark 5 (Generality)

1EJ7

The statement made in Theorem 3.1 is more general than what is typically stated in the literature, e.g., [moller1965quasi, linnainmaa1974analysis, knuth1997art_vol2, goldberg1991every, higham2002accuracy], which often imposes the stronger condition that e(x) \geq e(y) holds for the normal representations of x and y, or sometimes the even stronger one \vert x \vert \geq \vert y \vert.

Instead, Theorem 3.1 only requires that x and y admit a combination of representations such that e(x) \geq e(y). They may very well admit representations such that the opposite is true. This generality is exploited in the proof of the following theorem.

End of Remark rmk:generality.

Theorem

Theorem 3.2 (6op EFT over addition in Dekker’s system)

W8MJ

Under Rule 2.6 and nearest rounding, \forall x, y \in \mathbb D, the following formulas achieve EFT z + zz = x + y:

\begin{align} z & = fl( x + y); \\ w & = fl( z - x); \\ z1 & = fl( y - w); \\ v & = fl( w - z); \\ z2 & = fl( x + v); \\ zz & = fl( z1 + z2). \end{align}

Proof.

The case when x and y admit representations with e(x) \geq e(y) has already been covered by the proof of Theorem 3.1 since it is easy to show that z2 = 0 following w = z - x in this case.

Therefore, we limit our discussion below to the complementary case, i.e., when x and y do not admit representations such that e(x) \geq e(y).

In this scenario, aside from the obvious condition d = e(x) - e(y) < 0, we also have that y cannot admit a representation with the exponent E_{\min} since, otherwise, any representation of x would lead to e(x) \geq e(y) for this representation of y.

Consequently, y admits a normal representation in \mathbb D.

We work with this normal representation of y in the following.

In other words, when writing y = m(y) \times \beta^{e(y)} below, the conditions e(y) > E_{\min} and \beta^{t-1} \leq \vert m(y) \vert < \beta^t are implied.

These conditions appear in Lemma ?, ? and Lemma ?, ? invoked in this proof.

The proof below consists of three parts: first, we show that z1=y-w under the above conditions; second, we show that w-z2 = z-x by invoking Theorem 3.1; third, we show that zz = z1 + z2.

We proceed to show that z1=y-w still holds

by separating the discussion into four cases based on the signs of f and g, similar to that in the proof of Theorem 3.1.

We assume that overflow does not happen when forming z for the four cases below.

The special scenario of overflow is addressed immediately after the discussion of these cases.

Adjustwidth.

1.5em

kwdcolorCase 1: if f \geq 0 and g > 0, we again have \zeta \in \mathbb Z as in Case 1 of Theorem 3.1, where \zeta is defined in (?), and thus, z = x + y. This leads to w = z - x = y

and z1 = fl(y - w) = 0 = y - w as desired.

Additionally, we also have v = -x, z2 = 0, and zz = 0 following w = z - x.

kwdcolorCase 2: if f \geq 0 and g \leq 0, we have d = f - g \geq 0, which contradicts the assumption d < 0. Thus, this is a null case.

kwdcolorCase 3: if f < 0 and g \geq 0, recall that z = m(z) \times \beta^{e(z)} = round(\zeta) \times \beta^{e(z)}, where \zeta is defined in (?),

we have

\begin{align} z - x & = \left( m(z) - m(x) \cdot \beta^f \right) \times \beta^{e(z)} \\ & = \left( m(z) - m(x) \cdot \beta^f - m(y) \cdot \beta^g + m(y) \cdot \beta^g \right) \times \beta^{e(z)} \\ & = y + \left( m(z) - m(x) \cdot \beta^f - m(y) \cdot \beta^g \right) \times \beta^{e(z)} \\ & \in \left[ y - \tfrac{1}{2} \times \beta^{e(z)} , y + \tfrac{1}{2} \times \beta^{e(z)} \right] \subseteq \left[ y - \tfrac{1}{2} \times \beta^{e(y)} , y + \tfrac{1}{2} \times \beta^{e(y)} \right] . \end{align}

From Lemma ?, ? presented after this theorem, we know

that y - fl(z-x) = y-w can only take values \pm 1 \times \beta^{e(y)-1}, 0, or \pm 1 \times \beta^{e(y)}, all of which are in \mathbb D.

Therefore, we have z1 = y-w as desired.

kwdcolorCase 4: if f < 0 and g < 0, we have that z admits a representation with e(z) \leq e(y) + 1 following Lemma 2.12.

Working with a representation of z such that e(z) \leq e(y) + 1 holds, the condition that g < 0 further

implies that e(z) = e(y) + 1.

Similar to (?), we have in this case

z - x \in \left[ y - \tfrac{1}{2} \times \beta^{e(z)} , y + \tfrac{1}{2} \times \beta^{e(z)} \right] = \left[ y - 1 \times \beta^{e(y)} , y + 1 \times \beta^{e(y)} \right],

where \beta = 2 is used for the last equality.

When t > 1, we can invoke Lemma ?, ? presented after this theorem to arrive at the desired result z1 = y - w as in Case 3.

The special situation t = 1 is addressed in Remark 6 following this theorem.

We now address the special scenario of kwdcoloroverflow when forming z.

Notice that overflow cannot possibly happen in Cases 1 and 2 above because we have e(z) < e(y) under the combination of assumptions d < 0 and f \geq 0.

Therefore, we need only to concentrate on Cases 3 and 4 above, where f < 0.

Moreover, since x and y must have the same sign for z to overflow,

it is sufficient to address only the case where both x and y are positive.

Because overflow leads to clipping in Dekker’s system, we have z = \big(\beta^t - 1\big) \times \beta^{E_{\max}} and, therefore,

z - x = \left( \big(\beta^t-1\big) - m(x) \cdot \beta^{f} \right) \times \beta^{E_{\max}} \geq \left( \big(\beta^t-1\big) - \big(\beta^t-1\big) \cdot \beta^{-1} \right) \times \beta^{E_{\max}} = \big(\beta^t-1\big) \times \beta^{E_{\max}-1},

where f \leq -1 is used for the inequality and \beta = 2 is used for the last equality.

Moreover, because of overflow, we also have x+y>z, i.e., z-x<y.

Thus, by monotonicity, we have

\big(\beta^t-1\big) \times \beta^{E_{\max}-1} \leq w \leq y.

Because of (?), we can write

\begin{align} y & = \tilde{m}(y) \times \beta^{E_{\max}-1} ; \\ w & = \tilde{m}(w) \times \beta^{E_{\max}-1} , \end{align}

where \tilde{m}(y)\in\mathbb Z and \tilde{m}(w)\in\mathbb Z.

Notice that we have used \tilde{m}(\cdot) instead of m(\cdot) for the mantissas in (?) and (?) because they are not necessarily valid representations in \mathbb D.

Moreover, since \tilde{m}(y) \leq \big(\beta^t - 1\big) \cdot \beta and \tilde{m}(w) \geq \big(\beta^t-1\big), we can write

y - w = \big(\tilde{m}(y) - \tilde{m}(w)\big) \times \beta^{E_{\max}-1},

where \tilde{m}(y) - \tilde{m}(w) \in \mathbb Z and 0 \leq \tilde{m}(y) - \tilde{m}(w) \leq \beta^t - 1.

Thus, y-w \in \mathbb D with (?) being a valid representation, which leads to z1 = y - w as desired.

This concludes the discussion for the special scenario of kwdcoloroverflow when forming z.

Now that we completed the demonstration of z1 = y - w, we proceed to show that w-z2 = z-x.

When f \geq 0, from the discussion above, Case 1 is the only nontrivial case under the conditions of the theorem,

for which w-z2 = z-x holds because w = z - x and z2 = 0.

When f<0, i.e., e(x) < e(z), following Theorem (3.1), operations (3.2), (3.2), and (3.2) form a 3op EFT over addition (after adjusting for the signs), which leads to w - z2 = z - x.

Combined with z1 = y - w obtained earlier, this leads to

z + z1 + z2 = x + y.

It remains to show that zz = z1 + z2, i.e., (3.2) also commits no rounding error.

For all non-empty cases discussed above, including the special scenario of overflow when forming z and the special systems with t=1, we have that z1 = y - w admits a representation in \mathbb D with an exponent no less than e(y) - 1.

Since d = e(x) - e(y) < 0, it follows that z1 can be expressed as \tilde{m}(z1) \times \beta^{e(x)} where \tilde{m}(z1) \in \mathbb Z.

Moreover, from the proof of Theorem (3.1), we have that z2 can be expressed as m(z2) \times \beta^{e(x)} where m(z2) \in \mathbb Z and \vert m(z2) \vert < M.

Therefore, z1+z2 can be expressed as an integer times \beta^{e(x)} as well, i.e., z1+z2 = \Big(\tilde{m}(z1) + m(z2)\Big) \times \beta^{e(x)}.

From (?), we have

\vert z1 + z2 \vert = \vert x + y - z \vert \leq \vert x + y - y \vert = \vert x \vert

following the nearest rounding property,

which leads to \vert \tilde{m}(z1) + m(z2) \vert \leq \vert m(x) \vert < M.

Therefore, z1+z2 \in \mathbb D and

zz = z1 + z2 follows.

End of proof for Theorem 3.2.

Remark

Remark 6 (Special scenario: t=1)

O5R7

We use this remark to address the special scenario when t=1 in Case 4 of Theorem 3.2.

When t=1, the mantissa can only take value 0 or \pm 1.

If z = 0, z obviously admits a representation with exponent E_{\min} and,

hence, we can invoke Lemma 2.15 to arrive at z = x + y.

If either x or y is 0, z = x + y also holds since x,y \in \mathbb D.

Following the same argument as in Case 1 of Theorem 3.2, we arrive at zz = 0 and z + zz = x + y subsequently.

Given the above observation, we assume that x, y, and z all have nonzero mantissa below.

Recall the conditions f = e(x) - e(z) < 0 and g = e(y) - e(z) < 0 for Case 4 of Theorem 3.2, combined with t=1, we have that \vert x \vert < \vert z \vert and \vert y \vert < \vert z \vert, which imply that x and y must have the same sign, and so does z.

Therefore, it suffices to consider the case where x, y, and z all have mantissa 1.

Recall that z admits a representation with e(z) = e(y) + 1 from Case 4 of Theorem 3.2, we can write y = 1 \times \beta^{e(y)} and z = 1 \times \beta^{e(y)+1}.

Moreover, following the condition d = e(x) - e(y) < 0, it is necessary that e(x) = e(y) - 1 and x = 1 \times \beta^{e(y) - 1} because, otherwise, i.e., if e(x) < e(y) - 1, x + y would round to y instead of z.

Therefore, we have z-x = (1 + \nicefrac{1}{2}) \times \beta^{e(y)}, which means that w = fl(z-x) can be either 1 \times \beta^{e(y)} or 1 \times \beta^{e(y)+1}, depending on the tie-breaking rule.

Therefore, y-w can only take value 0 or -1 \times \beta^{e(y)}, both of which are in \mathbb D.

Hence, we arrive at the desired result z1 = y - w.

End of Remark rmk:6opEFT_Case4_t=1.

Lemma

Lemma 3.3

YD6T

With \beta=2 and nearest rounding, given y = m(y) \times \beta^{e(y)} \in \mathbb D with \beta^{t-1} \leq \vert m(y) \vert < \beta^t and e(y) > E_{\min}, the rounding outcome of a real number

\tilde{w} \in \left[ y - \tfrac{1}{2} \times \beta^{e(y)} , y + \tfrac{1}{2} \times \beta^{e(y)} \right] admits a normal representation with exponent e(y)-1, e(y), or e(y)+1.

Moreover, the difference y-fl(\omega) can take values \pm 1 \times \beta^{e(y)-1}, 0, or \pm 1 \times \beta^{e(y)} only.

Proof. We have y \neq 0 since \vert m(y) \vert \geq \beta^{t-1}.

Moreover, it suffices to consider only the case y>0 because of symmetry.

We first address the special case t=1, where the mantissa can only take value 1.

We can relax the interval to \left[ y - \tfrac{1}{2} \times \beta^{e(y)} , y + 1 \times \beta^{e(y)} \right], which becomes \left[ 1 \times \beta^{e(y)-1} , 1 \times \beta^{e(y)+1} \right] in this case.

Since both endpoints of the above interval are in \mathbb D, by Lemma 2.8 (Monotonicity), we have that \tilde{w} can only round to one of the following three floating point numbers:

\left[ 1 \times \beta^{e(y)-1} , 1 \times \beta^{e(y)+1} \right] \intersect \mathbb D = \left\{ 1 \times \beta^{e(y)-1}, 1 \times \beta^{e(y)}, 1 \times \beta^{e(y)+1} \right\}.

Consequently, the difference y - fl(\tilde{w}) can only take values

\left\{ 1 \times \beta^{e(y)-1}, \enskip 0, \enskip - 1 \times \beta^{e(y)} \right\}.

We note here that the last member of (?), (?), i.e., 1 \times \beta^{e(y)+1}, may overflow. In that case, \tilde{w} can only round to the first two members of (?), (?) in Dekker’s system.

With the above special treatment for t=1, we assume t>1 and separate the discussion below based on the size of m(y).

Adjustwidth.

1.5em

kwdcolorCase 1: if m(y) = \beta^{t-1}, we can relax the interval to \left[ y - \tfrac{1}{2} \times \beta^{e(y)} , y + 1 \times \beta^{e(y)} \right], which becomes \left[ \big(\beta^t - 1 \big) \times \beta^{e(y)-1} , \big(\beta^{t-1} + 1 \big) \times \beta^{e(y)} \right] in this case, with both endpoints in \mathbb D.

By monotonicity, \tilde{w} can only round to one of the following three floating point numbers:

\left[ \big(\beta^t - 1 \big) \times \beta^{e(y)-1} , \big(\beta^{t-1} + 1 \big) \times \beta^{e(y)} \right] \intersect \mathbb D = \left\{ \big(\beta^t - 1 \big) \times \beta^{e(y)-1}, \beta^{t-1} \times \beta^{e(y)}, \big(\beta^{t-1} + 1 \big) \times \beta^{e(y)} \right\}.

Consequently, the difference y - fl(\tilde{w}) can only take values

\left\{ 1 \times \beta^{e(y)-1}, \enskip 0, \enskip - 1 \times \beta^{e(y)} \right\}.

kwdcolorCase 2: if \beta^{t-1} < m(y) < \beta^{t} - 1, we can relax the interval to \left[ y - 1 \times \beta^{e(y)} , y + 1 \times \beta^{e(y)} \right], which becomes \left[ \big( m(y) - 1 \big) \times \beta^{e(y)} , \big( m(y) + 1 \big) \times \beta^{e(y)} \right] in this case, with both endpoints in \mathbb D.

By monotonicity, \tilde{w} can only round to one of the following three floating point numbers:

\left[ \big( m(y) - 1 \big) \times \beta^{e(y)} , \big( m(y) + 1 \big) \times \beta^{e(y)} \right] \intersect \mathbb D = \left\{ \big( m(y) - 1 \big) \times \beta^{e(y)}, m(y) \times \beta^{e(y)}, \big( m(y) + 1 \big) \times \beta^{e(y)} \right\}.

Consequently, the difference y - fl(\tilde{w}) can only take values

\left\{ 1 \times \beta^{e(y)}, \enskip 0, \enskip - 1 \times \beta^{e(y)} \right\}.

We note here that if t=1 or 2, we would have \beta^{t-1} + 1 \geq \beta^{t} - 1, leading to a null case here.

kwdcolorCase 3: if m(y) = \beta^{t} - 1, we can relax the interval to \left[ y - 1 \times \beta^{e(y)} , y + 1 \times \beta^{e(y)} \right], which becomes \left[ \big(\beta^t - 2 \big) \times \beta^{e(y)} , \beta^{t-1} \times \beta^{e(y)+1} \right] in this case, with both endpoints in \mathbb D.

By monotonicity, \tilde{w} can only round to one of the following three floating point numbers:

\left[ \big(\beta^t - 2 \big) \times \beta^{e(y)} , \big(\beta^{t-1} \big) \times \beta^{e(y)+1} \right] \intersect \mathbb D = \left\{ \big(\beta^t - 2 \big) \times \beta^{e(y)}, \big(\beta^t - 1 \big) \times \beta^{e(y)}, \beta^{t-1} \times \beta^{e(y)+1} \right\}.

Consequently, the difference y - fl(\tilde{w}) can only take values

\left\{ 1 \times \beta^{e(y)}, \enskip 0, \enskip - 1 \times \beta^{e(y)} \right\}.

We note here that the last member of (?), (?), i.e., \beta^{t-1} \times \beta^{e(y)+1}, may overflow. In that case, \tilde{w} can only round to the first two members of (?), (?) in Dekker’s system.

End of proof for Lemma ?, ?.

Lemma

Lemma 3.4

O7DR

With \beta = 2, t > 1, and nearest rounding, given y = m(y) \times \beta^{e(y)} \in \mathbb D with \beta^{t-1} \leq \vert m(y) \vert < \beta^t and e(y) > E_{\min}, the rounding outcome of a real number \tilde{w} \in \left[ y - 1 \times \beta^{e(y)} , y + 1 \times \beta^{e(y)} \right] admits a normal representation with exponent e(y)-1, e(y), or e(y)+1.

Moreover, the difference y-fl(\tilde{w}) can take values \pm 1 \times \beta^{e(y)-1}, 0, or \pm 1 \times \beta^{e(y)} only.

Proof.

The proof mostly follows that of Lemma ?, ?.

As in Lemma ?, ?, it suffices to consider only the case y>0.

Adjustwidth.

1.5em

kwdcolorCase 1: if m(y) = \beta^{t-1}, the interval becomes \left[ \big(\beta^t - \beta \big) \times \beta^{e(y)-1} , \big(\beta^{t-1} + 1 \big) \times \beta^{e(y)} \right], with both endpoints in \mathbb D.

By monotonicity, \tilde{w} can only round to one of the following \beta+2 (i.e., 4 since \beta=2) floating point numbers between the two endpoints:

\left\{ \big(\beta^t - 2 \big) \times \beta^{e(y)-1}, \enskip \big(\beta^t - 1 \big) \times \beta^{e(y)-1}, \enskip \beta^{t-1} \times \beta^{e(y)}, \enskip \big(\beta^{t-1} + 1 \big) \times \beta^{e(y)} \right\}.

Consequently, the difference y - fl(\tilde{w}) can only take values

\left\{ 1 \times \beta^{e(y)}, \enskip 1 \times \beta^{e(y)-1}, \enskip 0, \enskip - 1 \times \beta^{e(y)} \right\}.

kwdcolorCase 2: if \beta^{t-1} < m(y) < \beta^{t} - 1, this case has already been covered in the proof of Case 2 of Lemma ?, ?.

kwdcolorCase 3: if m(y) = \beta^{t} - 1, this case has already been covered in the proof of Case 3 of Lemma ?, ?.

End of proof for Lemma ?, ?.

Lemma

Lemma 3.5

JE4I

For \tilde{z} \in \mathbb R that rounds to z = m(z) \times \beta^{e(z)} in \mathbb D, if \vert \tilde{z} \vert \leq (M-1)\times\beta^{E{\max}}, i.e., \tilde{z} does not overflow, we have \vert z - \tilde{z} \vert \leq \tfrac{1}{2} \times \beta^{e(z)}.

Moreover, when z is not a subnormal number,

we also have \vert z - \tilde{z} \vert \leq \epsilon \vert z \vert.

Proof.

Expressing \tilde{z} as \tilde{z} = \zeta \times \beta^{e(z)}, we have m(z) = round(\zeta) following Lemma 2.11 and, therefore, \vert m(z) - \zeta \vert \leq \tfrac{1}{2}.

It follows that \vert z - \tilde{z} \vert = \vert m(z) - \zeta \vert \times \beta^{e(z)} \leq \tfrac{1}{2} \times \beta^{e(z)}.

Notice that the result above holds for any valid representation of z.

When z is not a subnormal number, working with its normal representation m(z) \times \beta^{e(z)} where \vert m(z) \vert \geq \beta^{t-1}, we have \vert z - \tilde{z} \vert \leq \tfrac{1}{2} \times \beta^{e(z)} = \tfrac{1}{2} \cdot \beta^{1-t} \cdot \beta^{t-1} \times \beta^{e(z)} \leq \epsilon \vert z \vert.

End of proof for Lemma lemma:bound_on_rounding_with_rounding_output.

Lemma

Lemma 3.6

9WI3

Given x,y \in \mathbb D and \tilde{z} = x + y \in \mathbb R, which rounds to z = m(z) \times \beta^{e(z)} in \mathbb D, if \vert \tilde{z} \vert \leq (M-1)\times\beta^{E{\max}}, i.e., \tilde{z} does not overflow, we have \vert z - \tilde{z} \vert \leq \tfrac{1}{2} \times \beta^{e(z)} and \vert z - \tilde{z} \vert \leq \epsilon \vert z \vert.

Proof.

It suffices to consider only the case when z is a subnormal number.

In this case, we have z = x + y = \tilde{z} from Lemma 2.15 and, hence, the stated results still hold.

End of proof for Lemma lemma:bound_on_rounding_with_rounding_output_addition_special.

Corollary

Corollary 3.7

PPD4

Under the conditions of Theorem 3.1 or the conditions of Theorem 3.2 and assuming overflow does not happen when forming z, we have \vert zz \vert \leq \tfrac{1}{2} \times \beta^{e(z)} and \vert zz \vert \leq \epsilon \vert z \vert.

Lemma

Lemma 3.8

WAQ7

Given x,y \in \mathbb D and \tilde{z} = x + y \in \mathbb R, which rounds to z,

if \vert \tilde{z} \vert \leq (M-1)\times\beta^{E{\max}}, i.e., \tilde{z} does not overflow, we have \vert z - \tilde{z} \vert \leq \epsilon \vert \tilde{z} \vert.

Proof. It suffices to consider only the case \tilde{z} \geq 0 since both \mathbb D and \mathbb R are symmetric. The two cases discussed below cover all possible outcomes of x+y that do not lead to overflow.

When \tilde{z} \in \left[ 0 , \beta^t \times \beta^{E_{\min}} \right], we can express \tilde{z} as \zeta \times \beta^{E_{\min}}, where \zeta = m(x) \cdot \beta^{e(x)-E_{\min}} + m(y) \cdot \beta^{e(y)-E_{\min}}.

Since e(x),e(y) \geq E_{\min}, we have that \zeta \in \mathbb Z and hence can take values 0,1,2,\cdots,\beta^t. Since overflow has been precluded, these possible options of \zeta all lead to \tilde{z} \in \mathbb D and hence z - \tilde{z} = 0.

When \tilde{z} \in \left[ \beta^{t-1} \times \beta^{E} , \beta^t \times \beta^{E} \right] for E_{\min} < E \leq E_{\max}, noticing that the space between two adjacent floating point numbers in this interval is 1 \times \beta^E and since overflow has been precluded, we have \vert z - \tilde{z} \vert \leq \tfrac{1}{2} \times \beta^E following nearest rounding and, therefore, \vert z - \tilde{z} \vert \leq \tfrac{1}{2} \cdot \beta^{1-t} \cdot \beta^{t-1} \times \beta^E \leq \epsilon \vert \tilde{z} \vert.

(In this case, we actually have a strict inequality \vert z - \tilde{z} \vert < \epsilon \vert \tilde{z} \vert because z - \tilde{z} would be zero if \tilde{z} = \beta^{t-1} \times \beta^{E}.)

End of proof for Lemma lemma:bound_on_rounding_with_rounding_inputs.

Corollary

Corollary 3.9

Q7UK

Under the conditions of Theorem 3.1 or the conditions of Theorem 3.2 and assuming overflow does not happen when forming z, we have \vert zz \vert \leq \epsilon \vert \tilde{z} \vert where \tilde{z} = x+y.

Remark

Remark 7 (Conciseness)

UF0C

We note here that \delta_1 from (?) should be zero for any reasonable machine since we expect the calculation of (0+x_1) to incur no rounding error.

However, as noted in [higham2002accuracy], “\cdotswe should not attach too much significance to the precise values of the constants in error bounds” and, from the same work, “It is worth spending effort, though, to put error bounds in a concise, easily interpreted form.”

Padding with the extra term (1+\delta_1) here does make the error bounds more concise and easily interpretable.

End of Remark rmk:conciseness_in_error_bounds.

Remark

Remark 8 (n and \epsilon)

UGXJ

We note here that the results (?) and (?) are derived under the assumption that n\epsilon^2 < 1.

For modern large scale applications potentially executed at low precision, where both n and \epsilon can be quite large, this is a significant improvement from the standard assumption n\epsilon < 1

in terms of the applicability of the results.

Indeed, the concern on the magnitude of n and \epsilon has been recognized and motivated the work on probabilistic error bounds; see, e.g., [higham2019new].

End of Remark rmk:significance_of_n_epsilon^2.

Remark

Remark 9 (3op vs 6op)

JE0K

On modern hardware, floating point operation count often has little impact on performance; it is the data movement that tends to dominate both the execution time and energy consumption.

Time spent on small amounts of floating point operations can often be hidden entirely by data movement due to overlapping executions.

The additional floating point operation count in Algorithm ? is therefore not a serious disadvantage compared to Algorithm ?, given that they both involve the same additional variable e, whereas y and those appearing inside add_3op and add_6op can be treated as temporary variables from the perspective of program translation and execution.

End of Remark rmk:cost_on_modern_hardware.

Remark

Remark 10

6YIV

The reference sum used in the above error calculation is obtained by carrying out the summation using Algorithm ? (double 6op compensation) with the extended 80-bit data format available on x86 architecture.

This 80-bit data format allocates 64 bits for the mantissa, hence having unit round-off \epsilon_{80} = 2^{-64}. In comparison, the single and double precision data formats have unit round-off \epsilon_{32} = 2^{-24} and \epsilon_{64} = 2^{-53}, respectively.

Although the reference sum, denoted hereafter as \mathcal{S}_\text{ref},

is different from the true sum \tilde{s}, we have from triangle inequality that \vert \mathcal{S} - \tilde{s} \vert \leq \vert \mathcal{S} - \mathcal{S}_\text{ref} \vert + \vert \mathcal{S}_\text{ref} - \tilde{s} \vert.

Since \vert \mathcal{S}_\text{ref} - \tilde{s} \vert is calculated using a very accurate algorithm with the extended 80-bit precision, we can expect it to amount to a small perturbation only in relation to \vert \mathcal{S} - \tilde{s} \vert and \vert \mathcal{S} - \mathcal{S}_\text{ref} \vert.

To elaborate, \vert \mathcal{S}_\text{ref} - \tilde{s} \vert is bounded by \epsilon_{80}^2 \cdot (2n-1) \sum_{k=1}^n \vert x_k \vert according to (?).

Among all the experiments from Tables ? and ?, the most accurate sum calculation uses Algorithm ? (double 6op compensation) with double precision, which leads to a similar bound \epsilon_{64}^2 \cdot (2n-1) \sum_{k=1}^n \vert x_k \vert on \vert \mathcal{S} - \tilde{s} \vert, a factor of 2^{-22} \sim 10^{-7} greater than that of \vert \mathcal{S}_\text{ref} - \tilde{s} \vert.

Therefore, it is reasonable to consider the reference sum as a good substitute for the true sum.

Indeed, numerical observation confirms that, with the exception of the double 6op column in Table 2 when n is very small (n \leq 2^4), even the very pessimistic bound on \vert \mathcal{S}_\text{ref} - \tilde{s} \vert is small enough compared to \vert \mathcal{S} - \mathcal{S}_\text{ref} \vert to not affect the exponents reported in Tables ? and ?.

End of Remark rmk:reference_sum_in_place_for_true_sum.

Source and licence

The text on this page is from arXiv:2602.19452v1 by Longfei Gao and Frimpong Baidoo, under the licence CC BY 4.0. The corpus made these changes: it read the items out of the LaTeX source, it expanded the macros of the paper, it put each proof after its statement, and it converted the text to HTML. The formulas are the TeX of the paper, and KaTeX renders them. A formula or a reference can look different from the PDF. The page is published under CC BY 4.0.

The record of each item is in analysis/objects/2602/2602.19452.jsonl.