• Owl@mander.xyz
        link
        fedilink
        arrow-up
        4
        ·
        2 days ago

        In mathematics, the natural numbers are the numbers 0, 1, 2, 3, and so on, possibly excluding 0.[1] Some start counting with 0, defining the natural numbers as the non-negative integers 0, 1, 2, 3, …, while others start with 1, defining them as the positive integers 1, 2, 3, … .[a] Some authors acknowledge both definitions whenever convenient.[2] Sometimes, the whole numbers are the natural numbers as well as zero. In other cases, the whole numbers refer to all of the integers, including negative integers.[3] The counting numbers are another term for the natural numbers, particularly in primary education, and are ambiguous as well although typically start at 1.

        Sauce

        So it is undefined behavior, great

        • calcopiritus@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          edit-2
          1 day ago

          Yes. Some mathematicians think that 0 is natural, others don’t. So “natural number” is ambiguous.

          In order to avoid ambiguity, instead of using fancy “N”, you should use fancy “N0” to refer to {0,1,2,3,4,…} and “positive integers” to refer to {1,2,3,4,…}.