• alsimoneau@lemmy.ca
    link
    fedilink
    arrow-up
    1
    ·
    3 hours ago

    That never arises in normal use though. I didn’t even know it existed since anything that would yield one raises an exception instead.

    • arty@feddit.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 hour ago

      But the OP complains specifically about typeof NaN, and not about Math.sqrt(-1) // NaN

      I know this doesn’t count as “normal use”, but in Python you get it e.g. via math.inf * 0.