Zero Suppression

Zero suppression is the removal of redundant zeroes from a number. This can be done for storage, page or display space constraints or formatting reasons, such as making a letter more legible.

Examples:

  • 00049823 → 49823
  • 7.678600000 → 7.6786
  • 0032.3231000 → 32.3231
  • 2.45000×1010 → 2.45×1010
  • 0.0045×1010 → 4.5×107

One must be careful; in physics and related disciplines, trailing zeros are used to indicate the precision of the number, as an error of ±1 in the last place is assumed. Examples:

  • 4.5981 is 4.5981±0.0001
  • 4.59810 is 4.5981±0.00001
  • 4.598100 is 4.5981±0.000001

It is also a way to store a large array of numbers, where many of the entries are zero. By omitting the zeroes, and instead storing the indices along with the values of the non-zero items, less space may be used in total. It only makes sense if the extra space used for storing the indices (on average) is smaller than the space saved by not storing the zeroes. This is sometimes used in a sparse array.

Example:

  • Original array: 0, 1, 0, 0, 2, 5, 0, 0, 0, 4, 0, 0, 0, 0, 0
  • Pairs of index and data: {2,1}, {5,2}, {6,5}, {10,4}

Famous quotes containing the word suppression:

    A state that denies its citizens their basic rights becomes a danger to its neighbors as well: internal arbitrary rule will be reflected in arbitrary external relations. The suppression of public opinion, the abolition of public competition for power and its public exercise opens the way for the state power to arm itself in any way it sees fit.... A state that does not hesitate to lie to its own people will not hesitate to lie to other states.
    Václav Havel (b. 1936)