Float Precision Loses Payment Company $1.2M Over 3 Years?!

FLOAT PRECISION DISASTER! Used float for money math! $0.02 rounding error per customer! 470K customers * $0.07 error = $1.27M stolen! Class action lawsuit! CFO FIRED! $4.5M total cost!

#php #phpdisaster #floatprecision #moneyloss #roundingerror #paymentfailure #productionbug #phpshorts #phpwtf #$1.2mlost #careerending #bcmathrequired

https://www.youtube.com/watch?v=p-Bzp8spzdA

Float Precision Loses Payment Company 1.2M Over 3 Years?! #phpshorts

YouTube

@Oleksii @robinsyl #ARM64 grows because #Intel and #AMD basically gave up delivering compareable computing power in the same thermal, electrical and price envelope.

Add to it the rise of #SBCs like #RaspberryPi that further kicked the cost down in terms of basic computing and the big #Linux #community that welcomes cheap #hardware and does it's best to put it to good use.

It truly confirms @landley 's saying that #Innovation in Computing it actually trickling up and thus #tech gets moved from the #Desk to the #Rack to "the #Cloud"...

Obviously, I wished for truly #OpenSource'd #RISCv to take the place but that's about 5-25 years lagging behind #ARM due to #patents in many key technologies like #PowerSaving...

Oleksii (@Oleksii@social.linux.pizza)

Attached: 1 image @kkarhan@infosec.space @robinsyl@meow.social I would say ARM is growing kinda fast. What are your ideas? Who is using ARM? https://flathub.org/en/year-in-review/2025

Linux.Pizza

@skimlines

I haven't looked too closely, but the "only sometimes it's short a nickel" screams #rounding error to me. You're using #floats, so floating-point #precision issues can also creep in, though with small values that's less likely.

You might use #Decimal values instead of floats (in the decimal module). They're pretty standard for #currency calculations.

[...]

#RoundingError

@grajohnt
Here you go, sections 7.4, 7.5
They have different rules for rounding for Imperial and metric.
•4.77 m is rounded down to a posted 4.6 m. That is 15′ 8″ and gets rounded and posted as 15′ 3″
•4.68 m is rounded down to a posted 4.6 m. That is 15′4″ and gets rounded down and posted as 15′0 ″

#Inch #foot #SI #roundingError

https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/772037/traffic-signs-manual-chapter-4.pdf