**2. Marks**

An approach to deal with the inaccuracy associated with any measurement or computation process with physical quantities is built by means of an interval tool: marks, which define intervals in which it is not possible to make any distinction between its elements, i.e., indiscernibility intervals. Marks are computational objects; however, initial marks can come from either direct or indirect readings from a measurement device. Therefore, it is necessary to represent them on a computational scale to acquire suitable computation items. When a measurement reading or a computation is obtained as a number on a numerical

scale, the resulting value has to be associated to a subset of R of indiscernible numbers from this value. Each point of this subset has the same right to be considered as the value of the measurement or computation. This kind of subsets leads to the concept of a mark considered a "spot" of certain size, called the "granularity" of the mark.

Let *D In* be a digital scale in floating point notation. A mark on *D In* is a tuple of the following five real numbers:


As the numbers *n* and *b* are specific on the digital scale *D In*, and the value of the tolerance *t* is assigned for the user, the mark will be denoted by m = *c*, *g* . Tolerance *t*, number of digits *n* and base *b* define the *type* of the mark. The set of marks of the same type is denoted by *<sup>M</sup>*(*<sup>t</sup>*, *n*, *b*).

The center of a mark is a reading in a measurement device, so it carries an error and an uncertainty associated to the problem under study. Both yield the value of its granularity. The center and granularity define the mark on the digital scale. Now, it is possible to start the computations required by the mathematical model. The errors in each step of the computations will increase the value of the granularity.

The granularity and tolerance must satisfy a minimum condition of validity of the mark as follows:

$$b^{-n} \le \mathcal{g} < t < 1,\tag{1}$$

These concepts are developed in [7,18], which contain the definition of a mark, its components (center, tolerance, granularity, and base number of the numerical scale), features (valid or invalid mark and associated intervals), relationships (equality and inequality), basic operators (max, min, sum, difference, product, and quotient) and general functions of marks and semantic interpretations through associated intervals to the operands and the results.

#### *2.1. Basic Operators of Marks*

Operations between marks are defined for marks of the same type and the result is also of the same type as the data. In this way, the tolerance is constant along with any computation, but the granularity increases, reflecting the step-by-step loss of information, which constitutes the deviation of the computed value from the exact value. An extract definition of elementary operators is presented after this, together with a different characterization of the operator difference.

The extension *fM* of a basic operator *f* ∈ {max, min, +, −, ∗, /} to two given marks x = *cx*, *gx* ∈ *<sup>M</sup>*(*<sup>t</sup>*, *n*, *b*) and y = *cy*, *gy* ∈ *<sup>M</sup>*(*<sup>t</sup>*, *n*, *b*) is the following:

$$f\_M(\mathfrak{r}\_\prime \mathfrak{v}) = \langle di(f(c\_{\mathfrak{r}\prime}c\_{\mathfrak{y}}), \mathfrak{g}\_{\mathfrak{z}}) \in M(\mathfrak{t}, \mathfrak{n}, \mathfrak{b}) \rangle$$

where *di*(*f*(*cx*, *cy*)) is the digital computation of the function *f* at (*cx*, *cy*) on the scale *D In*, supposing a minimum relative displacement of *di*(*f*(*cx*, *cy*)) with regard to the exact value

*f*(*cx*, *cy*); and *gz* is the granularity of the result, which has to be *gz* ≥ max(*gx*, *gy*) and is specified as the following:

$$\lg = \gamma\_{x,y} + b^{-n}$$

where the value *b*−*<sup>n</sup>* is the computation error of *di*(*f*(*cx*, *cy*)), which is the minimum error of any computation. Any computation has to carry this error by adding *b*−*n*. The term *γ<sup>x</sup>*,*<sup>y</sup>* is the smallest number, verifying the following:

$$\begin{aligned} f(c\_{\mathbf{x},\mathbf{c}}c\_{\mathbf{y}}) \* [1 + \gamma\_{\mathbf{x},\mathbf{y}} \, 1 - \gamma\_{\mathbf{x},\mathbf{y}}] & \subseteq f \mathcal{R}(c\_{\mathbf{x}} \* [1 + \mathcal{g}\_{\mathbf{x}}, 1 - \mathcal{g}\_{\mathbf{x}}], c\_{\mathbf{y}}) \\ f(c\_{\mathbf{x},\mathbf{c}}c\_{\mathbf{y}}) \* [1 + \gamma\_{\mathbf{x},\mathbf{y}} \, 1 - \gamma\_{\mathbf{x},\mathbf{y}}] & \subseteq f \mathcal{R}(c\_{\mathbf{x},\mathbf{c}}c\_{\mathbf{y}} \* [1 + \mathcal{g}\_{\mathbf{y}}, 1 - \mathcal{g}\_{\mathbf{y}}]) \end{aligned}$$

where *f R* is the *modal syntactic* extension of *f* [7].

For the operators min and max, no computations with the centers are necessary and the resulting granularity is *gz* = max(*gx*, *gy*). The results are transformed to the following:

$$\max\{\mathfrak{x}, \mathfrak{y}\} = \langle \max\{c\_{x\wedge} c\_{y}\}, \max\{g\_{x\wedge} g\_{y}\} \rangle \tag{2}$$

$$\min\{\mathfrak{x}, \mathfrak{y}\} = \left\langle \min\{c\_{\mathbf{x}, \prime} c\_{\mathbf{y}}\}, \max\{\mathbf{g}\_{\mathbf{x}, \prime} \mathbf{g}\_{\mathbf{y}}\} \right\rangle \tag{3}$$

$$
\mathfrak{x} + \mathfrak{y} = \langle \mathfrak{c}\_x + \mathfrak{c}\_y, \max \{ g\_{x'} g\_{\mathfrak{y}} \} + b^{-n} \rangle \tag{4}
$$

$$\mathfrak{x} - \mathfrak{y} = \left\{ \begin{array}{l} \langle \mathfrak{c}\_{\mathfrak{x}} - \mathfrak{c}\_{\mathfrak{y}}, \max\left\{ \left. \mathfrak{g}\_{\mathbf{x}\prime} \mathcal{G}\_{\mathcal{Y}\prime} \right| \frac{\left| \mathfrak{c}\_{\mathfrak{x}} \right|}{\left| \mathfrak{c}\_{\mathfrak{x}} - \left| \mathfrak{c}\_{\mathfrak{y}} \right| \right|} \left| \mathfrak{g}\_{\mathbf{x}\prime} \right| \frac{\left| \mathfrak{c}\_{\mathfrak{x}} \right|}{\left| \mathfrak{c}\_{\mathfrak{x}} - \left| \mathfrak{c}\_{\mathfrak{y}} \right|} \left| \mathfrak{g}\_{\mathbf{y}} \right| \right\} + b^{-n} \right\} & \text{ if } \mathfrak{c}\_{\mathfrak{x}} \neq \mathfrak{c}\_{\mathfrak{y}} \\ \langle \mathfrak{0}, \max\left\{ \mathfrak{g}\_{\mathbf{x}\prime} \mathcal{G}\_{\mathcal{Y}} \right\} \rangle & \text{ if } \mathfrak{c}\_{\mathfrak{x}} = \mathfrak{c}\_{\mathfrak{y}} \end{array} \tag{5}$$

$$\mathfrak{x}\*\mathfrak{y} = \langle \mathfrak{c}\_{\mathfrak{x}}\*\mathfrak{c}\_{\mathfrak{y}}, \max \{ g\_{\mathfrak{x}}, g\_{\mathfrak{y}} \} \rangle \qquad \qquad \text{for } \mathfrak{c}\_{\mathfrak{x}} = \mathfrak{c}\_{\mathfrak{y}} $$

$$\text{tr}\,\mathfrak{z}/\mathfrak{y} = \langle c\_{\mathfrak{x}}/c\_{\mathfrak{y}}, \max\left\{ g\_{\mathfrak{x}}, \frac{\mathfrak{z}\mathfrak{y}}{1 - \mathfrak{g}\_{\mathfrak{y}}} \right\} \rangle + b^{-n} \rangle\tag{7}$$

.

where *cx* and *cy* are think positive for the operators + and −

The difference in the particular case of two marks with equal centers is 0 without any computation. There is a similar situation with the maximum and minimum operators. In these cases, the granularity of the result must be the greatest of the operands' granularities.

Two shortcomings in the use of marks as numerical entities are evident. The first one concerns the granularity of the difference between two marks x and y with positive but near centers. In its formula, the difference between the two centers appears as the denominator in a fraction. Consequently, when the centers are close, the granularity can be large enough to invalidate the mark, i.e., when granularity is larger than the tolerance, thus invalidating any further result. This can be avoided by taking into account the two real numbers *x* and *y*:

$$x - y = \frac{x^m - y^m}{x^{m-1} \* y^0 + x^{m-2} \* y^1 + \dots + x^1 \* y^{m-2} + x^0 \* y^{m-1}},$$

hence, it is possible to compute the difference x − y as the following:

$$(\mathbf{r} - \boldsymbol{\mathfrak{u}} = (\mathbf{r}\_m - \boldsymbol{\mathfrak{u}}\_m) \Big/ (\mathbf{r}^{m-1} \ast \boldsymbol{\mathfrak{u}}^0 + \mathbf{r}^{m-2} \ast \boldsymbol{\mathfrak{v}} + \dots + \mathbf{r} \ast \boldsymbol{\mathfrak{v}}^{m-2} + \mathbf{r}^0 \ast \boldsymbol{\mathfrak{v}}^{m-1}) \tag{8}$$

where *m* is a natural number large enough so that x*<sup>m</sup>* and y*<sup>m</sup>* are not near. The center of the resulting mark is *cx* − *cy*, but its granularity is both different and lesser.

Firstly, to avoid overflows in the computations of x*<sup>m</sup>* and y*<sup>m</sup>* it is convenient to normalize, a priori, the two marks to be divided by the greater mark m = max(<sup>x</sup>, y). For example, if, *cy* < *cx* then, m = x, and the normalized marks are the following:

$$
\mathfrak{u} = \mathfrak{x}/\mathfrak{m} = \langle 1, \mathfrak{g}\_{\mathfrak{u}} \rangle\_{\prime} \qquad \mathfrak{v} = \mathfrak{v}/\mathfrak{m} = \langle \mathfrak{c}, \mathfrak{g}\_{\mathfrak{v}} \rangle\_{\prime}
$$

with 0 < *c* < 1, and the difference is at this time the following:

$$\mathbf{u} - \mathfrak{v} = (\mathbf{u}^m - \mathfrak{v}^m) / (\mathbf{u}^{m-1} \ast \mathfrak{v}^0 + \mathfrak{u}^{m-2} \ast \mathfrak{v} + \dots + \mathfrak{u} \ast \mathfrak{v}^{m-2} + \mathfrak{u}^0 \ast \mathfrak{v}^{m-1}). \tag{9}$$

The power of one mark *cx*, *gx <sup>m</sup>* with *m* a natural number is a particular case of a product with the same factors *cx*, *gx <sup>m</sup>* = *cx*, *gx*∗···∗*cx*, *gx* then, by induction it is the following:

$$
\langle \mathfrak{c}\_{\mathfrak{x}\prime} \mathfrak{g}\_{\mathfrak{x}} \rangle^{m} = \langle \mathfrak{c}\_{\mathfrak{x}\prime}^{m} \mathfrak{g}\_{\mathfrak{x}} + (m-1)b^{-n} \rangle .
$$

Then, the numerator of (9) is as follows:

$$\mathfrak{M} = \mathfrak{u}^{\mathfrak{m}} - \mathfrak{v}^{\mathfrak{m}} = \langle 1, (\mathfrak{g}\_{\mathfrak{u}} + (m - 1)b^{-n}) - \langle \mathfrak{c}^{\mathfrak{m}}, \mathfrak{g}\_{\mathfrak{v}} + (m - 1)b^{-n} \rangle$$

and can be calculated by means of the former formula (5). If *c<sup>m</sup>* ≤ 1/2, then the following holds:

$$\mathcal{R} = \langle 1 - c^m, \max\left( (\mathcal{g}\_u + (m-1)b^{-n})/(1 - c^m), \mathcal{g}\_v + (m-1)b^{-n} \right) \rangle,\tag{10}$$

interchanging *gu* and *gv* when *cx* < *cy*.

N will be a valid mark when its granularity is small, i.e., when the term *c<sup>m</sup>* is less than a fixed small number < 1/2, for example = *b*−*n*. So,

$$m = \left[ \log \left( b^{-n} \right) / \log \left( c \right) \right]. \tag{11}$$

The computation of the denominator of the Equation (9) is not problematic because all their terms are positive:

$$\begin{split} \mathbf{u}^{m-1} &= \langle 1, \max(\mathcal{g}\_{u} + (m-2)b^{-n}) \rangle \\ \mathbf{u}^{m-2} \* \mathbf{v}^{1} &= \langle c, \max(\mathcal{g}\_{u} + (m-3)b^{-n}, \mathcal{g}\_{v}) + b^{-n} \rangle \\ &= \langle c, \max(\mathcal{g}\_{u} + (m-2)b^{-n}, \mathcal{g}\_{v} + b^{-n}) \rangle \\ &= \langle c, \max(\mathcal{g}\_{u} + (m-2)b^{-n}, \mathcal{g}\_{v} + b^{-n}) \rangle \\ \mathbf{u}^{m-1} \* \mathbf{v}^{1-1} &= \langle c^{i-1}, \max(\mathcal{g}\_{u} + (m+i-1)b^{-n}, \mathcal{g}\_{v} + (i-2) \* b^{-n}) + b^{-n} \rangle \\ &= \langle c^{i-1}, \max(\mathcal{g}\_{u} + (m-i)b^{-n}, \mathcal{g}\_{v} + (i-1)b^{-n}) \rangle \\ &= \langle c^{i-1}, \max(\mathcal{g}\_{u}, \mathcal{g}\_{v} + (m-3)b^{-n}) + b^{-n} \rangle \\ &= \langle c^{m-2}, \max(\mathcal{g}\_{u} + b^{-n}, \mathcal{g}\_{v} + (m-2)b^{-n}) \rangle \\ &= \langle c^{m-2}, \max(\mathcal{g}\_{u} + (m-1)b^{-n}) \rangle \\ \mathbf{v}^{m-1} &= \langle c^{m-1}, \mathcal{g}\_{v} + (m-1)b^{-n} \rangle \end{split}$$

it results to

$$\mathfrak{D} = \langle (1^m - c^m)/(1 - c), \max(\mathfrak{g}\_u + mb^{-n}, \mathfrak{g}\_v + (2m - 1)b^{-n}) \rangle. \tag{12}$$

Dividing N and D

$$-\mathfrak{v} = \mathfrak{N}/\mathfrak{D}$$

u

x

and, eventually de-normalizing by multiplying by m,

$$
\mathfrak{n} - \mathfrak{n} = (\mathfrak{n} - \mathfrak{o}) \* \mathfrak{m} \tag{13}
$$

For example, for *t* = 0.05, *b* = 10, *n* = 15, the formula (5) gives the following:

$$
\langle \text{3.121}, 0.0001 \rangle - \langle \text{3.1212}, 0.0001 \rangle = \langle -0.0002, 1.560600 \rangle,
$$

which is an invalid mark because the granularity is larger than 1. From (11), *m* = 538995 and (13) give the following:

$$
\langle 3.121, 0.0001 \rangle - \langle 3.1212, 0.0001 \rangle = \langle -0.0002, 0.010101 \rangle,
$$

a valid mark.

The second shortcoming is the necessity to calculate the elementary functions (exp, log, power, trigonometric,. . . ) for marks. This is possible with power series but when

the convergence is slow, run time can belong. A better alternative is to use the routines ©FDLIBM developed at SunSoft, Sun Microsystems, to approximate these functions using polynomials. The computational processes for marks were developed and integrated into MATLAB in the MICELab research group (Institute of Informatics and Applications, University of Girona). The code to perform computations with marks can be found in [19].

## *2.2. Associated Intervals*

The theory of marks is a by-product of modal intervals theory, linked by the "improper" [7] associated interval to a mark denoted by *Iv*(m):

$$I\upsilon(\mathfrak{m}) = \mathfrak{c} \* [1 + t, 1 - t],\tag{14}$$

where \* is the product of a real number by an interval. Its domain, or set of its points, is referred to as *Iv* and called the indiscernibility margin of m. Another related interval is the external shadow defined by the following:

$$\text{Exsl}(\mathfrak{m}) = I\upsilon(\mathfrak{m}) \* [1 - \mathfrak{g}, 1 + \mathfrak{g}] = \mathfrak{c} \* [1 + t, 1 - t] \* [1 - \mathfrak{g}, 1 + \mathfrak{g}],\tag{15}$$

necessary to obtain the semantic meaning of a computation made using marks. As *g* < *t*, the external shadow is an improper interval that verifies the inclusion of *Exsh*(m) ⊆ *Iv*(m).

#### *2.3. Semantic Theorem for Marks*

The associated intervals allow the semantic properties of Modal Intervals to be applied to the results of functions of marks. Given the marks x1, ... ,x*<sup>n</sup>* ∈ *<sup>M</sup>*(*<sup>t</sup>*, *b*, *<sup>n</sup>*), the continuous R*n* to R function *z* = *f*(*<sup>x</sup>*1, ..., *xn*) and the modal syntactic extension *f R* of *f* , then the following holds:

$$f\mathcal{R}(Iv(\mathfrak{x}\_1),\ldots,Iv(\mathfrak{x}\_n)) \subseteq Exsh(\mathfrak{y}).$$

This inclusion confirms the important Semantic Theorem for a function of marks, which provides meaning to any valid result in the evaluation of a function. If the mark z is the calculus of a function of marks, z = *fM*(<sup>x</sup>1, ... ,x*k*), supposing that all the involved marks are valid, then we have the following:

$$(\forall z \in \text{Exsh}'(\mathfrak{y})) \ (\exists \mathbf{x}\_1 \in I\nu'(\mathfrak{x}\_1)) \dots (\exists \mathbf{x}\_k \in I\nu'(\mathfrak{x}\_\mathbb{n})) \ z = f(\mathbf{x}\_1, \dots, \mathbf{x}\_\mathbb{n}).\tag{16}$$

So, every point of the external shadow *Exsh* (z) is a true value of the function *f* for some values of the variables in the intervals *Iv* (<sup>x</sup>1)... *Iv* (<sup>x</sup>*n*).

The external shadow interval depends on the tolerance and the granularity of the mark, which shrinks the interval width with the unavoidable increase of the granularity. As the value approaches the tolerance (the center), the interval width tends to zero. This effect causes a loss of significance, which in many cases, is possible to avoid by performing a "translation" to avoid small values of the state variables. For example, adding a constant to the values of the state variables and scaling the common tolerance, if it depends on these values.
