浮点数,因为它们只包含一定数量的位,所以具有粒度。 因此它们不能表达无限的小数。 这意味着存在一个“最大可能值”ε,它满足以下等式

这个值被称为浮点系统的机器ε。
当实数四舍五入到最接近的浮点数时,机器ε构成了相对误差的上限。 这一事实使机器ε在确定许多迭代数值算法的收敛容差方面非常有用。
机器ε[1] 可以根据公式计算

因此,对于 IEEE 754 单精度,我们有

对于 IEEE 754 双精度,我们有

当
未知,但
已知为 2,则可以通过从一个试探值开始,例如 0.5,然后不断地将该值除以 2,直到
为真来找到机器ε。
这种粒度的一个影响是,一些基本的代数性质并不严格成立。 例如,如果我们有三个浮点数,x、y 和 z,我们可以证明

当浮点数用于迭代计算时,舍入误差和粒度误差会导致较大的误差。
- ↑ 维基百科中的机器ε