Hacker News new | past | comments | ask | show | jobs | submit login

  // [The eighth byte of LINENO_MID] changes in meaning over the course of
  // the program. It does indeed represent the billions digit most of
  // the time; but when the line number is getting close to a multiple
  // of 10 billion, the billions and hundred-millions digits will always
  // be the same as each other (either both 9s or both 0s). When this
  // happens, the format changes: the hundred-millions digit of
  // LINENO_MID represents *both* the hundred-millions and billions
  // digits of the line number, and the top byte then represents the
  // ten-billions digit. Because incrementing a number causes a row of
  // consecutive 9s to either stay untouched, or all roll over to 0s at
  // once, this effectively lets us do maths on more than 8 digits,
  // meaning that the normal arithmetic code within the main loop can
  // handle the ten-billions digit in addition to the digits below.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: