JFC please don't use floating point types for calculating financial transactions or storing monetary values. I just got asked to review some code by someone and it is the first thing I spotted.
JFC please don't use floating point types for calculating financial transactions or storing monetary values. I just got asked to review some code by someone and it is the first thing I spotted.
Nice:
βTaming Floating Point Sumsβ, Orson Peters (https://orlp.net/blog/taming-float-sums/).
Via HN: https://news.ycombinator.com/item?id=40477604
On Lobsters: https://lobste.rs/s/lps7qx/taming_floating_point_sums
#Programming #NumericalMethods #FloatingPoint #Sum #KahanSummation #Rust #AutoVectorization #Speed #Accuracy #RoundingErrors
The (sort of, maybe a bit) revival* of #blogs might be a good consequence of the flight to the #Fediverse - at least I've started writing and reading them again.
This one on #RoundingErrors is a corker by @micefearboggis and if you're at all interested in #Climate #homogenisation or #Statistics you should definitely be following him.
A classic of the #genre.
*Yes there's lots of caveats, notably, it maybe too soon to tell..
https://fediscience.org/@micefearboggis/109647834997768125
Rounding errors - extreme edition In which I look in mind-numbing detail at distributions of measurement errors caused by rounding. Ostensibly to resolve an urgent scientific question, but really because I think they're pretty. https://diagrammonkey.wordpress.com/2023/01/07/rounding-errors-extreme-edition/
Tweet from Lulu Friesdat (@LuluFriesdat), at Feb 5, 10:31 PM
Thread. We found #RoundingErrors in 30% of the precinct math worksheets that we examined from the #IowaCaucus. Each "rounding error" gave one extra delegate to a candidate, over 50% of the time the extra delegate went to @PeteButtigieg. https://t.co/I3KTkbtHdr #SMARTelections https://t.co/btcjCivtbk