this post was submitted on 24 Sep 2025
99 points (97.1% liked)

Programming

22872 readers
132 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] jasory@programming.dev 3 points 3 days ago (2 children)

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 6 points 3 days 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 3 points 3 days ago (2 children)

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.)

[–] azolus@slrpnk.net 2 points 3 days ago* (last edited 3 days 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.

[–] jasory@programming.dev 1 points 2 days 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.