# Machine Epsilon

Denoted by $E$. Learned this in CS370.

This maximum relative error measure of machine precision is called machine epsilon.

$E$ is the smallest number such that using $F(β,t,L,U)$, $fl(1+E)>1$

machine epsilon will depend on exactly how we determine $fl(x)∈F$ from the real number $x$, i.e., which slot we assign the real number to.

### Rounding vs. Truncation

- Round-to-nearest – rounds to closest available number in $F$.

- Usually the default.
- We’ll break ties by simply rounding $21 $ up. (Various other options exist …)

- Truncation/“Chopping” – rounds to next number in $F$ towards zero. i.e. simply discard any digits after the t-th.

Example

If a computer uses base $β$ arithmetic with $t$ digits in the significand, i.e., $F(β,t,L,U)$, and uses round-to-nearest, then the value of machine epsilon (or unit round-off error) is $E=21 β_{1−t}$ If truncation is used instead, then E will be $E=β_{1−t}$

In the real-world

In real-world floating point systems, there are additional choices available for rounding modes, including round-up, round-down, and round-towards-infinity, as well as options for tie-breaking under round-to-nearest (when the real value is halfway between two floating point numbers), such as round-to-odd, round-to-even, etc. For simplicity, this course will only consider truncation or round-to-nearest (with tie-breaking by rounding up, if it arises).

The signed relative error between any nonzero real number $x$ and its floating point representation $fl(x)$ can be written as a small multiple of $x$ (assuming $x=0$):

The signed relative error of using $fl(x)$ for $x$ is

$δ=xfl(x)−x $

which, by the design of $F$, does not exceed $E$ in size. That is, $fl(x)−x=δxwhere∣δ∣≤E$ Thus we have the relationship $fl(x)=x(1+δ)$

- $δ$ is some
**signed**number which must satisfy $−E≤δ≤E$ - $E$ is defined as some
**positive**number that gives a bound on $δ$