• shilangyu (lemmur)
    link
    13
    edit-2
    3 years ago

    I’m so bored of people bringing up NaN !== NaN when talking about “javascript’s wonkiness”. This is defined by IEEE for the floating point standard and it appears in any other language using IEEE 754 (which is the majority)

    • @handvat
      link
      53 years ago

      You shouldn’t attempt comparing 2 floating point numbers with simply == (or === in JavaScript) in most cases and in most languages anyways.

    • @spytfyre
      link
      13 years ago

      Totally agree. Moreover I can not think of a valid scenario where you would use such a comparison