• randy@lemmy.ca
    link
    fedilink
    arrow-up
    13
    ·
    edit-2
    8 days ago

    I got hung up on this line:

    This requires deterministic math with explicit rounding modes and precision, not the platform-dependent behavior you get with floats.

    Aren’t floats mostly standardized these days? The article even mentions that standard. Has anyone here seen platform-dependent float behaviour?

    Not that this affects the article’s main point, which is perfectly reasonable.

    • nimpnin@sopuli.xyz
      link
      fedilink
      arrow-up
      13
      ·
      8 days ago

      Mostly standardized? Maybe. What I know is that float summation is not associative, which means that things that are supposed to be equal (x + y + z = y + z + x) are not necessarily that for floats.

    • pinball_wizard@lemmy.zip
      link
      fedilink
      arrow-up
      2
      ·
      8 days ago

      The real standard is whatever Katherine in accounting got out of the Excel nightmare sheets they reconcile against.

    • bleistift2@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      2
      ·
      edit-2
      8 days ago

      If you count the programming language you use as ‘platform’, then yes. Python rounds both 11.5 and 12.5 to 12.