• jasory@programming.dev
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    2 days ago

    You can use Kahan summation to mitigate floating point errors. A mere 100 thousand floating point operations is a non-issue.

    As a heads up computational physics and mathematics tackle problems trillions of times larger than any financial computation, that’s were tons of algorithms have been developed to handle floating point errors. Infact essentially any large scale computation specifically accounts for it.

    • Treczoks@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      1 day ago

      Yep. And in accounting this is done with integers. In my field (not accounting), calculations are done either in integer or in fixed-point arithmetic - which is basically the same in the end. Other fields work with floats. This variety exists because every field has its own needs and preferences. Forcing “One size fits all” solutions was never a good idea, especially when certain areas have well-defined requirements and standards.

    • soc@programming.dev
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 day ago

      Yeah, but compared to counting money, nobody cares if some physics paper got its numbers wrong. :-)

      (Not to mention that would require the paper to have reproducible artifacts first.)

      • jasory@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        16 hours ago

        Physics modeling is arguably the most important task of computers. That was the original impetus for building them; artillery calculations in WW2.

        All engineering modeling uses physics modeling, almost always linear algebra (which involves large summations). Nuclear medicine—physics, weather forecasting—physics, molecular dynamics and computational chemistry—physics.

        Physics modeling is the backbone of modern technology, it’s why so much research has been done on doing it efficiently and accurately.

      • azolus@slrpnk.net
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 day ago

        We’re using general relativity to calculate sattelite orbits - fuck your point of sale system if our sattelites come crashing down we’re gonna have much bigger problems lol.