Experience-Monks / math-as-code

a cheat-sheet for mathematical notation in code form
MIT License
14.98k stars 1.07k forks source link

natural numbers #44

Open nshen opened 8 years ago

nshen commented 8 years ago
{ 0, 1, 2, 3, ... }
{ 1, 2, 3, 4, ... }

The latter is more common in computer science, for example:

function isNaturalNumber (n) {
  return isInteger(n) && n >= 0
}

the latter one is n > 0, not n>= 0
so which one is more common in computer science?