• Turun@feddit.de
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    1 year ago

    That’s because this is the maximum integer that can be stored in a double precision floating point number without loss of precision, lol

    • interolivary@beehaw.org
      link
      fedilink
      arrow-up
      7
      ·
      1 year ago

      That’s one thing that really bugs me about Javascript (weirdly enough I’m okay with eg prototypal inheritance and how this works, or at least worked before the bolted on classes that were added because apparently I’m like one of the dozen or so people who had no problems with those concepts). The fact that all numbers are floats can lead to a lot of fun and exciting bugs that people might not even realize are there until they suddenly get a weird decimal where they expected an integer