Floating-point relative accuracy

`d = eps`

returns the distance from `1.0`

to
the next largest double-precision number, that is, ```
eps =
2^-52
```

.

`d = eps(`

, where `x`

)`x`

has
data type `single`

or `double`

,
returns the positive distance from `abs(x)`

to the
next largest floating-point number of the same precision as `x`

.
The command `eps(1.0)`

is equivalent to `eps`

.

Was this topic helpful?