Moving Decimal Bug Loses Money 420
mario.m7 writes "Poste Italiane, the Italian postal service, suffered yesterday from an abnormal computation in ATM and credit card operations, since the decimal comma was not taken into account. The whole sum was therefore multiplied by 100, resulting in a 115,00 Euro transaction being debited as 11.500 Euro! Thousands of accounts are deep in the red and locked (link pumped through translator), so that no more operations are possible. Poste Italiane is gradually recovering the problem, fixing the error and re-crediting the sum debited in excess. Consumer associations have offered support to clients in case this lasts longer and causes damage."
You mean 11,500 Euro (Score:5, Informative)
Re: (Score:2)
Re: (Score:2, Informative)
I am not American, but I find the comma used as decimal point stupid and silly although I should be using it in my native locale.
Re: (Score:2)
Thankfully many applications, especially web based, allow both comma and period. Not all - and then there is CSV ...
Situation was worse some time ago in Firefox/Linux, it made some weird character from the numerical keyboard comma (Finnish keyboard). That made banking annoying.
Re: (Score:3, Interesting)
Re: (Score:2)
Perhaps if it were called a "decimal comma" it'll make more sense.
-dZ.
Re: (Score:2)
Re:You mean 11,500 Euro (Score:5, Funny)
It's still a decimal point. Europeans just put a little tail on it to be fancy.
Re:You mean 11,500 Euro (Score:4, Funny)
Re: (Score:3, Informative)
Re: (Score:2)
Perhaps you're biased by the very phrase "decimal point." If they were called "decimal commas" then using a comma might seem less stupid to you.
Some Martian is still trying to figure out the weird punctuation that Earthlings use to represent a trinary expoinfergraph; why not the usual squarglex sign? Stupid earthlings.
Re:You mean 11,500 Euro (Score:5, Insightful)
You know, I really never understood the decimal point being a comma. But then again, I'm an American.
Yeah, why can't everyone do it like I do it?
Re:You mean 11,500 Euro (Score:5, Interesting)
That's a bit naive of you. A better question is: why can't everyone do it the same way? Having a universal standard like this would have many advantages, while having multiple differing formats has only disadvantages.
So a reasonable person is left with the conclusion: doing it the same way everywhere is better. The question naturally follows: which would make a better standard?
The answer to this is: the English way. Why? Because when writing in any language, multiple commas may be used indicating the continuation of the sentence, just as they may be used indicating the continuation of an integer in English number notation. Furthermore, in any language, a period is used to indicate the end of a sentence, similarly to how they are used in English number notation to indicate the end of the integer.
The English way of writing numbers is simply superior, as it is consistent with the way punctuation is used in all languages.
To illustrate my point. I leave you with this bizzare. confusing continental-style punctuation use,
Silly. n'est-ce pas?
Re:You mean 11,500 Euro (Score:4, Insightful)
ink dots on fountain written text. It's far easier to be sure about a comma rather than some stupid splatter. Regardless, people will disagree with you, so we still have the same problem.
Part of the reason is there isn't a compelling argument either way - yours is ok, but not really gripping. But what did you expect? It's commas.
Re:You mean 11,500 Euro (Score:5, Insightful)
Re: (Score:3, Funny)
Re:You mean 11,500 Euro (Score:5, Informative)
You're letting the punctuation confuse you. The computer doesn't use punctuation to represent the number.
The error was essentially that a number of Euro cents was interpreted as a number of Euro.
So if someone entered 11500 euro cents (115.00 Euro using American punctuation, 115,00 using European punctuation - which seems fair since we're counting Euros), and the display showed them that this is what they had entered, but the computer interpreted it as 11500 euros (11,500 using American punctuation, 11.500 using European). Just as TFS says.
"without _moving_ the seperator (or omitting it completely)" ... which is exactly what the summary says happened. Hell, did you even read the headline?
Re: (Score:3, Funny)
There, fixed that for you.
Obligatory Office Space (Score:5, Funny)
I always do that, I mess up some mundane detail!
Re: (Score:2)
Apparently I got logged off with my last comment, also not a mundane detail!
Re: (Score:3, Insightful)
Yeah, even the algorithm saw that reply coming and wanted to avoid it.
God Bless the USA! (Score:5, Funny)
Our Comma to separate numbers and periods to indicate decimal are far superior to your backward period to separate numbers and comma to indicate a decimal number!
Re:God Bless the USA! (Score:5, Funny)
I think you mean "God Save the Queen". We (the British) gave you the correct method for decimals before we decided to let you have the place. You've managed to pick up a few bad habits from the French, such as driving on the right.
But apart from that, you're doing quite well.
(For the benefit of Australians, this is humour, not flamebait.)
Re:God Bless the USA! (Score:4, Funny)
I think you mean "God Save the Queen". We (the British) gave you the correct method for decimals before we decided to let you have the place. You've managed to pick up a few bad habits from the French, such as driving on the right.
But apart from that, you're doing quite well.
(For the benefit of Australians, this is humour, not flamebait.)
Oh be quiet, you whinging pommy bastard.
Re:God Bless the USA! (Score:5, Funny)
Australians seem to be doing even better than Americans, then. They still drive on the proper side of the road, although they measure distances in kilometers rather than miles as god and the queen intended.
Well at least Australia is doing better than Canada. Those poor sods drive on the wrong side *and* use the metric system on their roads.
Re: (Score:2)
Did you just inadvertently congratulate America for not using the Metric system? Shame on you! It makes 10 weather so uncomfortable!
Re: (Score:2)
And Imperial system doesn't even make any sense:
thou
inch = 1000 thou
foot = 12 inches
yard = 3 feet
furlong = 220 yards
mile = 8 furlongs
league = 3 miles 15,840
yeah that makes complete sense!
And USA is the only country that still keeps using it.
Re: (Score:3, Funny)
Re:God Bless the USA! (Score:4, Informative)
Look at what those numbers are divisible by:
12 can be divided evenly by 2,3,4 or 6.
36 can be divided evenly by 2,3,4,6,9,12,18.
5280 can be divided evenly by 2, 3, 4, 5, 6, 8, 10, 11, 12, 15, 16, 20, 22, 24, 30, 32, 33, 40, 44, 48, 55, 60, 66, 80, 88, 96, 110, 120, 132, 160, 165, 176, 220, 240, 264, 330, 352, 440, 480, 528, 660, 880, 1056, 1320, 1760, 2640. The important ones being 2,3,4,5,6,8,10.
Plus metric measurements are generally too small (cm) or too big (m) to be practical for day to day uses.
So if you look at it from a pencil and paper math era perspective having the nice fractions was a plus. (
It's why we (thankfully) don't have metric time. 60 is divisible by 2,3,4,5,6,10,12,15,20, and 30. 100 is only divisible by 2,5,10,20,25, and 50. The Babylonians were onto something.)
Re:God Bless the USA! (Score:5, Informative)
"Plus metric measurements are generally too small (cm) or too big (m) to be practical for day to day uses."
Furthermore imperial measurements are generally too large (inch) or too small (yard) to be practical for day to day users. The fact that the mile exists also creates confusion because every old nations used to have it's own "mile" which either a lot bigger or a lot smaller than the English "mile".
Also multiplication by a number that is not equal to the numberbase(10) is annoying to use.
Out of the top of my head
1000mm=100cm=100dm=1m=0,1Dm=0,01hm=0,001km=0,000001Mm
Try to do that with the imperial system which randomly swaps between 6,2,12 and whatever they feel like.
Re: (Score:3, Informative)
Plus metric measurements are generally too small (cm) or too big (m) to be practical for day to day uses.
Excellent point. It is too bad that there is no measurement between the two. Hmm, maybe we should email the SI about this? It could be 1/10th of a meter, and how about "deci" (to indicate 10) as the prefix? I think it might solve the problem!
Re: (Score:2)
Well at least Australia is doing better than Canada. Those poor sods drive on the wrong side *and* use the metric system on their roads.
And on top of that we have French as one of our official languages.
Nous sommes vraiment des moutons perdus!
Re: (Score:3, Funny)
Re: (Score:2)
Re:God Bless the USA! (Score:5, Funny)
I think I read somewhere that the Australians would change from left to right in 2012. They would start with all the bigger vehicles like buses and lorries and if that turns out OK, it'll be mandatory for all motorized vehicles from 2015
Re:God Bless the USA! (Score:5, Funny)
Re:God Bless the USA! (Score:5, Interesting)
Re: (Score:3, Interesting)
Re: (Score:2)
Sounds like absolutely typical Microsoft localisation - rumour has it that their first attempts involved putting everything through an automated translator then cleaning up the result.
I'm given to understand that this caused quite a bit of trouble with a postscript printer driver....
Re: (Score:2)
Would that make them .ssv files? .scsv files? Or something else?
Re:God Bless the USA! (Score:5, Insightful)
Our method makes more sense. A sentence can have more commas than periods. Generally sentences have just one period (i'm distinguishing between dots and periods here). A period is a more solid division than a comma. It makes more sense to use the stronger punctuation as the mark between whole and fraction.
i'll grant that metric is better than imperial, but i think this is one thing where we have the better idea.
It's my opinion and it's worth every penny you paid for it.
Re: (Score:2)
i'll grant that metric is better than imperial, but i think this is one thing where we have the better idea.
Using a comma or a period for the decimal separator is not a metric vs imperial issue, neither system mandates the character used for that.
Re:God Bless the USA! (Score:4, Funny)
I am black on the right side. Loki is WHITE on the right side, all of his people are white on the right side!
Re: (Score:2)
As with most things, the USA is still using the same system as the UK, and it's only mainland Europe that has them reversed. I'm not sure 'God' has anything to do with it.
Of course He has something to do with it. As everyone of note knows, God is an Englishman. (There's even some evidence [imdb.com].)
1,00st post! (Score:4, Funny)
1,00st post!
Re: (Score:3, Funny)
Dear Mr. Anonymous Coward,
Your thousand separator is one off. Seeing your post is not the first post, I must assume you meant 100st post, because it will be dropped around there soon enough. In either case, you failed.
Best regards,
Your loving wife
Re: (Score:2, Funny)
I must assume you meant 100st post
That's about 630kg.
Pretty heavy for a post.
Re:1,00st post! (Score:4, Funny)
Whoosh 3,0
Not helping! (Score:2)
Given the subject, surely the submitter can see why it's worth clarifying whether they're using the decimal or comma convention in the summary itself!
Re: (Score:3, Informative)
...it's worth clarifying whether they're using the decimal or comma convention in the summary itself!
Yep the submitter got it wrong. Given that he is posting in English, to an American website, it makes no sense to use the comma as the decimal separator and the period as the thousands separator (unless the idea was to intentionally cause confusion to prove the point).
With a few exceptions (e.g. South Africa), the rule of thumb seems to be that if you're using English, you use "." as the decimal separator.
Wikipedia has a very long article on these things http://en.wikipedia.org/wiki/Decimal_separator [wikipedia.org], but
For the most part. (Score:2)
Most programs I have seen they don't allow you to type in thousands separator. If they are fancy they will display it to you for in the program when you type in the number. Otherwise it will not show... And for God sake why would you want to store the number as a string any ways?
Re:For the most part. (Score:4, Funny)
It's like the little penny tray. The pennies are for everyone. And we're just taking fractions of a penny here.
Re:For the most part. (Score:5, Funny)
They got it backwards. They're supposed to take fractions of a penny from many thousands of people, not many thousands of pennies from each person.
Re: (Score:2)
Re: (Score:2, Troll)
Int-like dataypes have hard limit of 2^32 or 64 or even more.
Eventually you simply want something bigger. And you also want to use somethign that can work well with XML schemans and several other systems. You simply have to use string as your other option is 32 bit int.
Also, String unlike Float does not loose precission. A lot slower, but precise.
Re:For the most part. (Score:5, Insightful)
int64 Unsigned: 0 to +18,446,744,073,709,551,615
You mean I cannot transfer my 18 quintillion, 446 quadrillion, 744 trillion, 73 billion, 709 million, 551 thousand and 615 dollars (or in easier words 18 billion billion dollars) as a single transfer from my banking account? I need to do two of them? This is outrageous!
Re: (Score:2)
This could be true in Zimbabwe.
Re:For the most part. (Score:5, Insightful)
Using strings to store numbers internally is wrong, it just is. It's slow, wasteful, and unnessecary. I don't think I've ever (in 20 years of coding) needed to store something bigger than 2^64, but if I did, there are plenty of options (e.g. BigDecimal in Java, bigint in Perl, etc) which are essentially unlimited in size. Doing math with strings is just such a horrible concept :) As for precision floats (i.e. fixed point) there are real solutions for that issue in most languages too. String isn't one of them.
Exchanging your data with other systems (e.g. generating a web page, or XML, or whatever) is of course an entirely different story, you do what makes sense for the requirements. XML Schema, for example, mandates that a parser has to accept up to an 18-digit value for the digit type, but doesn't set an upper bound. So you need knowledge of the parser to know how to transfer very large values.
Re: (Score:2)
How about using a standard like IEEE floating point Hex? I can store Gigantorus numbers in tiny spaces with that.
42F9F8BC71118F14 = 456,897,665,767,665.25
IEEE Floating point in Hexadecimal is a standard that anyone that has a clue about computers or data storage should already know about. The fact they were storing numbers as strings means their programmers are complete uneducated noobs.
That's what you get when you outsource your software to the cheapest contractor.
Re: (Score:2)
> That's what you get when you outsource your software to the cheapest
> contractor.
Because the most expensive one obviously would have done it right.
Sure.
Re: (Score:3, Insightful)
In reality an ATM doesn't need any decimal point. Unless there's some ATM out there that dispenses anything coins.
I've never understood why every ATM that I've ever used that dispensed $20 bills made me type in the 00 cents each and every time.
Re: (Score:3, Insightful)
Re: (Score:3)
Huh, haven't you heard of BigInteger like data types ?
They are pretty common in accounting in various languages...
http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html [sun.com]
Re: (Score:2)
a 64 bit long has more than enough space to handle every currency in the world (except possibly hyper-inflationary Zimbabwe) to a tiny fraction of a penny. Even then, there are data structures that offer arbitrary precision and arbitrary ranges of values that are far more efficient than any string manipulation. In most cases, you are going to be converting the string back to a number for real math anyway. Hell even cobol handles numbers better than strings.
I won't even go into the rediculousness of using xm
Re: (Score:2)
BCD is an option.
Re: (Score:2)
actually, 2^32 might have range of 2,147,483,648, but in reality, last 3 digits need to be abused for currency fraction. And 2 million is not a lot money in some currencies. In Italian Lira, that is about ~ 2k dollars. Amount that is very reasonable to withdraw from ATM.
Re: (Score:2)
In Italian Lira, that is about ~ 2k dollars.
Of course, Italy no longer uses the Lira; they've switched to the Euro.
Amount that is very reasonable to withdraw from ATM.
Man, you must have a lot more money in your account than I do! ;-) Besides, here in the US at least, most ATMs will not allow you to withdraw that much cash. Things may be different in Europe, I've never used an ATM there.
Re: (Score:3, Informative)
This is the same in my bank, if you type in . it gives an error. In addition it requires you to type in the ,00 too, and next to the sum text box is an example like "150,00".
Having comma/decimal as a separator is stupid anyway, space does just fine - 150 000.35
Re: (Score:2)
Re: (Score:2)
I (and many friends) use apostrophe as decimal separator in handwriiteing
can't say as I've ever seen this done before. Did you make it up or is it in use somewhere else?
(perhaps you should work on your spelling before trying to reinvent numeric notation)
Re: (Score:2)
And for God sake why would you want to store the number as a string any ways?
It's not so much the storage as it is the transport. Sometimes you need to send things as a flat text file with one record per line, for data exchange. Then you start running into all sorts of problems like tabs vs spaces, field widths, line delimiters, right vs left justification, and other oddness like these separators. Really if they wanted to do that more smartly, they'd omit all separators in a numeric field and simply stat
Good to be a programmer (Score:4, Insightful)
Good thing the programmers will be shielded from any consequences from this little 'bug'.
It doesn't matter that it caused potential harm to clients, corporations in the form of losses, lost time, expenses, etc.
The simple programmers just need to release a hot-fix or service pack.
Now if these were engineers, and I mean real engineers not "software engineers", there would be consequences.
Their licenses could be revoked, they could be investigated for incompetence, and held professionally and personally liable for any bugs.
But please, keep on purchasing software with NO WARRANTY, or NO FITNESS FOR A PARTICULAR PURPOSE, and that contains KNOWN DEFECTS.
Gotta keep the programming industry alive, and don't wanna stress theses "engineers" too much.
Re: (Score:2)
"Real engineers" have all sorts of cock-ups. Look at cost-overruns in the overage one-off construction project - they are similar to overruns in software projects.
Safety-critical hardware has all sorts of redundancy. I daresay that software could have a safety factor built in - you could duplicate the code 5 times using separate software teams and different methodologies, then weed out the incorrect results, but who would pay for all that waste? Even aircraft engineers have about 1% safety margins. Software
Re: (Score:2)
Not the programmer's fault.
If it wasn't properly specified and it wasn't properly tested then it's the fault of management for not making sure that processes were followed.
Mistakes happen - if they aren't picked up then it's the fault of the process.
Re: (Score:3, Interesting)
well I'm a 'formal' engineer... but let's be frank here.
The world has not come to an end.
The accounts will be fixed.
The clients will not lose any money.
Yeah, nothing would make me happy than requiring every line of software to be written by a real engineer with responsibilities, but it's more for my benefit than society's (job security, competent colleagues.. you know how doctors and lawyers do it).
In the end, society is making the trade offs.
Society is choosing to have features developed faster than a pro
Back to Roman numerals (Score:2)
Periods and commas. (Score:4, Insightful)
I never understood why the hell Europeans swap periods and commas. Grammatically it doesn't even make sense.
A period ends a sentence or statement, which to me should imply a whole number. A comma is simply a separator, used within sentences. So why would it be used to separate decimals?
It would be like writing a sentence this way:
I went to the supermarket to buy some cola. cabbages. and condoms,
Maybe there's a very good reason for it, but I don't see it.
Regarding the story on hand, that really sucks. I wonder if they will pull the same garbage as American banks where customers only have 60 days to report a problem otherwise nothing will be done. Whereas, if the bank screws up in your favor, they could go into your account 20 years from now and withdraw whatever extra money they gave you.
Re:Periods and commas. (Score:5, Insightful)
See, that argument doesn't make 'sense' either. If a comma is a separator, why not use it to separate decimals? Answer: no reason, it is completely and utterly arbitrary. You're arguing that the point of view you're used to is somehow intrinsicly 'right' - it isn't, it's just usage and custom.
It would be like writing a sentence this way:
Somehow, I suspect mainland Europe knows what it's like to write a sentence including thousands sperators and decimal separators...
I'm British - I use "," to separate thousands and "." to separate decimals, but that doesn't make me 'right' - it really is just usage and custom, there isn't anything to really recommend one way over the other.
Cheers,
Ian
Re: (Score:2)
Spiffing!
Re: (Score:2)
I'm British - I use "," to separate thousands and "." to separate decimals, but that doesn't make me 'right' - it really is just usage and custom, there isn't anything to really recommend one way over the other.
Actually there is. The reason why a comma is used as a decimal separator in some places is the following. The decimal separator is more important
that the thousands separator, a misplaced thousands separator doesn't matter since it has no effect on the value. Now a speck of ink is more easily mistaken for a dot than a comma. It would be bad to mistake a speck of ink for a decimal separator.
Some people have argued that because the dot is more important for sentence structure it should also be used for the mor
Re: (Score:3, Interesting)
If a comma is a separator, why not use it to separate decimals?
A number can only have one decimal separator. A sentence can have only one period.
A number can have many thousands separators. A sentence can have many commas.
This isn't a strong argument, but in the absence of any reason to do it otherwise it's better to do it in the marginally more consistent way.
Re: (Score:3, Interesting)
OK then - here you go [wolframalpha.com]. I await the US and Britain's change to the 'universal' standard with interest.
If you want to implement a new worldwide custom then that's fine but I suspect you will need a very good justification and not simply the desire to do something new.
New? Err...no, no this isn't new. It's centuries old. What's happened here is some US-centric programmer has forgotten to do a locale conversion. Happened to m
Re: (Score:3, Informative)
Um, maybe look again [wikipedia.org]. Most of Asia including India, China and Japan uses a decimal point rather than a decimal comma. If you want a popularity contest, dot wins.
But it's not really about popularity is it? If the accompanying text is English, it should be a dot. If the accompanying text is French it should be a comma. Unless you're Canadian, in which case you're probably just confused.
Re: (Score:2)
I don't think this has anything to do with us using commas for decimal space at all. It is perfectly clear to us, despite it not being clear to your untrained mind ;)
My bank uses spaces to separate thousands and a comma for the decimal spot. If a sentence ends with a sum of money, we won't have two full stops in a row, which I'd find harder to read than "1 324 299,53" at the end of a sentence.
Re: (Score:2)
You fail to Recognise that seperators in numbers are completely irrelevant to English Grammar.
Similarily, if I say
"I would like to buy that item for $2.50 please."
That there is a period in the middle of the sentence. It's one thing that has bugged me for a long time. But the point is that Period and comma's are interchangable in math. After all, they are just symbols applied to a concept. I think the best way to describe it would be like saying the same rules for syntax that apply to English do not apply to
Logical separators [Re:Periods and commas.] (Score:2)
I never understood why the hell Europeans swap periods and commas. Grammatically it doesn't even make sense. A period ends a sentence or statement, which to me should imply a whole number. A comma is simply a separator, used within sentences. So why would it be used to separate decimals?
By your logic, both commas and periods as the decimal "point" separator are wrong, since the decimal is not the end of the number.
Logically, then, the decimal locator should be a semicolon: more of a stop than a comma, but not the end of the number. Like so:
12,345;67
That would avoid ambiguity in sentences like
"He said I owed 120. 20 for the part and the rest for labor."
Re: (Score:2)
I come form New Zealand - a country that has British conventions. We used the decimal point to separate the integer and the fraction part long before we had a decimal currency. So its not that the aremicans invented the 'period' (full stop in english) as decimal point.
Do Europeans have commas in therr IP addresses too?
This is stupid. (Score:3, Insightful)
Bizzarro Superman (Score:3, Funny)
It's just like in Superman III, but backwards!
Decimal and Thousands separators (Score:2)
Re: (Score:2)
Happened to me recently (Score:3, Interesting)
It worked fine until somebody used a different language OS... and some strange quantities were recorded, one slipped all the way through the process and a confused customer received a bill for 17.000.000 local currency (about U$ 1.000.000) . I fixed it by using the CultureInfo, etc..
I'm sure there are better ways and good practices, but keep in mind that where I work we don't even have testing, so I guess I'm getting sloppy. If someone wants to give advice, go ahead, I'll appreciate it (or at least should
Re: (Score:2)
>> If someone wants to give advice, go ahead, I'll appreciate it (or at least should :) ).
OK, here it goes: Don't make stupid mistakes like that.
-dZ.
Re:Happened to me recently (Score:5, Funny)
I made a similar mistake recently... I made a (.NET) data entry software
Don't you mean ,Net?
Re: (Score:3, Interesting)
You've got to handle that problem at the application layer, preferably as soon as possible.
Before converting it to a double or float point or whatever you are using, you have to do some data verification. Similarily, you wouldn't want someone putting in "ABC.75" dollars, because that can't be parsed, you have to handle all those scenarios. A try-catch will work for the obvious ones (like I stated) but there are some simple tips to help with the , and . translation done by the OS's.
All of it is done by handl
Windows XP (Score:2)
P.S: Just trolling.
In Socialist Italy...... (Score:2)
In Socialist Italy, the period separates you into groups of thousands!
testing is the issue (Score:4, Insightful)
This is not a representation issue. It is a project management and testing issue.
This Could Never Happen In The U.S. (Score:2)
Does your software work in Turkey? (Score:3, Informative)
This is just one of the many pitfalls when trying to localize your software.
Does Your Code Pass The Turkey Test? [moserware.com]