Anyone know how banks store the values of the amount we have in our accounts? I mean in the sense of internal storage and calculation. I've seen it stated that in the (presumably) US, they have by law to store amounts to 100th of a cent, sort of implying they do fixed-point decimal arithmetic on your account balance as it changes. Anyone know whether that just them or is that worldwide. Do we do anything different?
Anyone know how banks store the values of the amount we have in our accounts? I mean in the sense of internal storage and calculation. I've seen it stated that in the (presumably) US, they have by law to store amounts to 100th of a cent, sort of implying they do fixed-point decimal arithmetic on your account balance as it changes. Anyone know whether that just them or is that worldwide. Do we do anything different?
On 13/12/2022 18:26, TimS wrote:
Anyone know how banks store the values of the amount we have in our accounts?
I mean in the sense of internal storage and calculation. I've seen it stated >> that in the (presumably) US, they have by law to store amounts to 100th of a >> cent, sort of implying they do fixed-point decimal arithmetic on your account
balance as it changes. Anyone know whether that just them or is that
worldwide. Do we do anything different?
I can't imagine why they would need or want to store to 100th of a cent. 100th of a dollar is more likely.
But typically financial amounts are held in decimal (not binary) with
fixed 2 decimal places.
I heard an amusing story from someone hired to review a bank's COBOL
apps for a Euro compliance project back in the 1990s who discovered that
all the account calculation routines (adding, withdrawing funds,
displaying amounts etc) had been centralised into a few key subroutines.
Not just because this was good design but because it was the the outcome
of a previous round of work to make the systems support decimalisation
and the code was still in use 20+ years later. (And is probably still in
use now.)
Bruce Horrocks <07.013@scorecrow.com> wrote:
On 13/12/2022 18:26, TimS wrote:
Anyone know how banks store the values of the amount we have in our accounts?
I mean in the sense of internal storage and calculation. I've seen it stated
that in the (presumably) US, they have by law to store amounts to 100th of a
cent, sort of implying they do fixed-point decimal arithmetic on your account
balance as it changes. Anyone know whether that just them or is that
worldwide. Do we do anything different?
I can't imagine why they would need or want to store to 100th of a cent.
100th of a dollar is more likely.
But typically financial amounts are held in decimal (not binary) with
fixed 2 decimal places.
I heard an amusing story from someone hired to review a bank's COBOL
apps for a Euro compliance project back in the 1990s who discovered that
all the account calculation routines (adding, withdrawing funds,
displaying amounts etc) had been centralised into a few key subroutines.
Not just because this was good design but because it was the the outcome
of a previous round of work to make the systems support decimalisation
and the code was still in use 20+ years later. (And is probably still in
use now.)
Well, if it ain't broke, don't fix it!
1/100 cent seems reasonable to me. Rounding errors can mount up when you
are adding a large number of items.
I seem to recollect that there was a scandal because a bank employee had coded the system to round down all amounts add divert the fractions to his private account. Maybe an urban myth.
I seem to recollect that there was a scandal because a bank employee had coded the system to round down all amounts add divert the fractions to his private account. Maybe an urban myth.
On 16 Dec 2022 at 5:23:24 pm GMT, "John Hill" <yclept@outlook.com> wrote:
I seem to recollect that there was a scandal because a bank employee had
coded the system to round down all amounts add divert the fractions to his >> private account. Maybe an urban myth.
Wasn't that a plotline in a Superman film? Lex Luthor doing exactly that?
On 16 Dec 2022 at 5:23:24 pm GMT, "John Hill" <yclept@outlook.com> wrote:
I seem to recollect that there was a scandal because a bank employee had
coded the system to round down all amounts add divert the fractions to his >> private account. Maybe an urban myth.
Wasn't that a plotline in a Superman film? Lex Luthor doing exactly that?
On 13/12/2022 18:26, TimS wrote:
Anyone know how banks store the values of the amount we have in our accounts?
I mean in the sense of internal storage and calculation. I've seen it stated >> that in the (presumably) US, they have by law to store amounts to 100th of a >> cent, sort of implying they do fixed-point decimal arithmetic on your account
balance as it changes. Anyone know whether that just them or is that
worldwide. Do we do anything different?
I can't imagine why they would need or want to store to 100th of a cent. 100th of a dollar is more likely.
On 16 Dec 2022 at 17:14:02 GMT, "Bruce Horrocks" <07.013@scorecrow.com> wrote:
On 13/12/2022 18:26, TimS wrote:
Anyone know how banks store the values of the amount we have in our accounts?
I mean in the sense of internal storage and calculation. I've seen it stated
that in the (presumably) US, they have by law to store amounts to 100th of a
cent, sort of implying they do fixed-point decimal arithmetic on your account
balance as it changes. Anyone know whether that just them or is that
worldwide. Do we do anything different?
I can't imagine why they would need or want to store to 100th of a cent.
100th of a dollar is more likely.
This chap (on a forum for a well-known database) asserted quite firmly that this was the law, never mind whether it's needed or not. Presumably where he is and that was presumably the US. I became curious to know whether that's universal (both the 100th of a cent business, and the law) or not.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 26:16:30 |
Calls: | 10,390 |
Calls today: | 1 |
Files: | 14,064 |
Messages: | 6,417,041 |