What's the term for the coefficient that change any floating point number to its next or previous value?

90 Views Asked by At

I calculated that the following two coefficients will reduce any finite floating point number to its next exact lower value:

Single precision: 0.99999994

Double precision: 0.99999999999999989

This means it reduces the number to the next lower number that can be stored in the applicable FP format. It does so for any value.

Is there a technical term for these coefficients?

1

There are 1 best solutions below

0
On BEST ANSWER

There isn't a term for this constant because it doesn't exist: You can't perform this operation with a multiplication by a constant. For example, consider the double-precision numbers:

  • $a = 1$
  • $b = 1 + 2^{-52} \approx 1.000000000000000222044604925$
  • $c = 2 - 2^{-51} \approx 1.999999999999999555910790150$
  • $d = 2 - 2^{-52} \approx 1.999999999999999777955395075$

Then $a$ and $b$ form a pair of consecutive floating-point numbers, as do $c$ and $d$. But the ratios are different:

  • $\frac{a}{b} = \frac{2^{52}}{2^{52} + 1} \approx 0.9999999999999997779553950750$
  • $\frac{c}{d} = \frac{2^{53}-2}{2^{53}-1} \approx 0.9999999999999998889776975375$

These don't even round to the same double value, as the former gets represented as $1 - 2^{-52}$, and the latter gets represented as $1-2^{-53}$.

As for related terminology, the next/previous values are conventionally called “successor” and “predecessor”, and the smallest number $x$ such that $1 + x \ne 1$ in floating-point arithmetic is called machine epsilon.