A NaN spotted in the wild.

  • Orygin@sh.itjust.works
    link
    fedilink
    arrow-up
    29
    ·
    edit-2
    3 days ago

    NaN are not exclusive to JavaScript, it’s more scary that they’re using floating point numbers for monetary value.
    If you buy something at -Inf, do they empty the business bank account into yours?

    • verdare@piefed.blahaj.zone
      link
      fedilink
      English
      arrow-up
      13
      ·
      3 days ago

      Eh, it’s not a problem if prices are being converted to floating point at some point before being displayed.

      What you don’t want to do is store the definitive price as a floating point and perform calculations with it. I don’t see any reason to assume that’s happening here.

      • sik0fewl@piefed.ca
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        2 days ago

        It still makes no sense to convert to float and is likely to lead to a big at some point