today I'm thinking about the "don't use floating point for money" advice I hear all the time. It obviously has a lot of truth to it.

But -- Excel/Google Sheets uses floating point for all of its calculations, people use spreadsheets for money calculations all the time, and it generally seems to work just fine -- the results get rounded for display.

So I'm trying to figure out if there's a more nuanced guideline than "never use floating point for money".

@b0rk My first reaction to this is kinda condescending, which is just “Don’t use excel or google sheets for money if you actually need accuracy” and I’m debating how much that’s genuine advice I’d stand behind.

Possibly losing pennies or dollars or thousands of dollars to rounding errors is gonna be small potatoes compared to other errors caused by the difficult-to-debug nature of spreadsheets (see for example science.org/content/article/on).

@simrob @b0rk I think regardless of whether _you_ would stand behind that advice, in practice people who work with money professionally all use Excel all the time for it, including in complicated ways at large financial institutions.

@samth @simrob @b0rk There have been many studies showing how many spreadsheets have errors. But it's true that people use them, I like to say it's always a good sign when square people with the Thinkpads show up.

A funny think about the JP Morgan / Frank suit is that someone at the bank noticed their customer list was the Excel maximum row count.

@sayrer @simrob @b0rk Definitely lots of excel errors, but I don't know of any that either indicate a higher or lower rate than software, or errors due to binary floats.

@samth @simrob @b0rk there have been some studies that indicate a very high error rate, but I’m not sure how they got the data.

Floating point in Excel is a famous footgun:

en.wikipedia.org/wiki/Numeric_

and then you can dig in here:

learn.microsoft.com/en-US/offi

They also have weird cases where numbers are treated as dates, and things like that.

Follow

@sayrer
One source of that I've seen is the "Enron corpus" spreadsheets harvested from all the emails published after Enron went bankrupt in 2001. That collection of spreadsheets had an error in about 24 % of all reviewed documents.
@samth @simrob @b0rk

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.