• arty@feddit.org
      link
      fedilink
      English
      arrow-up
      0
      ·
      5 days ago
      $ python 
      Python 3.14.4 (main, Aug 20 2026, 10:41:58) [GCC 15.2.0] on linux
      Type "help", "copyright", "credits" or "license" for more information.
      >>> type(float('nan'))
      <class 'float'>
      
      • alsimoneau@lemmy.ca
        link
        fedilink
        arrow-up
        0
        ·
        4 days 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
          0
          ·
          4 days 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.