typodupeerror
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 internet speed test! × ## Swedish Stock Exchange Hit By Programming Snafu136 New submitter whizzter writes "I was reading the Swedish national news today and an image in a stock exchange related article struck my eye. An order had been placed for 4 294 967 290 futures (0xfffffffa or -6 if treated as a 32-bit signed integer), each valued at approximately 16,000 USD, giving a neat total of almost 69 trillion USD. The order apparently started to affect valuations and was later annulled, however it is said to have caused residual effects in the system and trading was halted for several hours." This discussion has been archived. No new comments can be posted. #### Swedish Stock Exchange Hit By Programming Snafu More Login ## Swedish Stock Exchange Hit By Programming Snafu Comments Filter: • #### Sven and Ole Found a Trading App (Score:5, Funny) <eldavojohn@nOsPAm.gmail.com> on Wednesday November 28, 2012 @04:27PM (#42121749) Journal Sven: Hey der Ole, check out dis new app I got on my phone here. Ole: *takes the phone and looks at the screen* Oh hey idn't dat neat? A stock trading app! Sven: Yeah I'm like a big shot power björker now! Börk! Börk! Börk! Ole: Oh ja, you betcha, hey I gotta a hot tip, I'm gonna buy six futures of Ikea for ya. Sven: Ole, you idiot! Stop that, I've only got a few cents on my account. Ole: Oh! Jajaja, oops, you're in da red now. Oofta, I'll fix this here, lemme just sell 'em real quick. Sven: No, stop, you'll just make things worse! Ole: I don't see a 'sell' button on dis thing, oh, I know! *punches some buttons* Oh dear. Oh shoot. Ja, I'm in a little over my head here, Sven. Sven: *grabs the phone* Negative 460 trillion dollars!? OLE, WHAT DID YOU DO? Ole: Oh well, ya see, I just bought negative six shares, ja? To undo me buying six positive shares, ja? And I guess der was like ... some underflow involved der? With de app, ja? Ah gosh gee, Sven, I'm sorry, I'll pay ya back after I settle up with da liquor store first, of course. • #### Re: (Score:3, Funny) 'll pay ya back after I settle up with da liquor store first, of course. Slashdot: We aren't racist/sexist. We shamelessly pick on everyone. • #### Re:Sven and Ole Found a Trading App (Score:5, Informative) by Anonymous Coward on Wednesday November 28, 2012 @05:40PM (#42122835) As a Swede I found the above posts very funny, though some things could be pointed out for the sake of clarity. 1) Björk is actually from Iceland. Can we elect The Swedish House Mafia as representatives of our culture instead please? 2) While I think Swedes on average consume a bit more hard liquor than the US, it's nothing like eastern Europe. We are mostly a beer people, and we are not afraid to import quality stuff. Though I guess in comparison to what goes for beer in the US, it's can almost be considered hard liquor ;-) 3) IKEA isn't a publicly traded company, and it's now owned by what is a series of (supposedly) non-profit trusts across the world with the single objective to keep it alive forever. Yes, Billy the bookcase will probably outlive you. • #### Re: (Score:1) by Anonymous Coward While we are happy to absolve you of the atrocity known as Bjork, us Americans of a certain age will always remember our first encounter with the Swedes: http://muppet.wikia.com/wiki/The_Swedish_Chef Börk! Börk! Börk! Good times. • #### Re: (Score:3) One of the first Slashdot April Fool's Day jokes had stories written in different fake languages; the Swedish one was written as tho by the Muppets' Swedish Chef. :) • #### Re: (Score:2) From the very early days of usenet: alt.swedish.chef.bork.bork.bork alt.french.captain.borg.borg.borg alt.ensign.crusher.die.die.die CleverNickname took the last one a bit personally, but he was young then. • #### Re: (Score:3) As a USAian of midwestern extraction and mixed Scandinavian heritage, we enjoy our "Sven & Ole" (and sometimes Lena) jokes. I was most impressed by eldavojohn's shibboleth, "oofta" (though more usually spelled uff-da). eldavojohn, where are you from? Wisconsin, Minnesota, or Michigan's U.P.? :) • #### Re: (Score:2) The Swedes in TGWTDT practically lived on aquavit, alongside coffee and sandwiches. Then again I think those books were more about Stieg Larsson's much more exciting, thriller-screenplay Sweden than actual Sweden. • #### Just be happy they weren't using 64-bit integers (Score:2, Funny) by Anonymous Coward Imagine it 0xFFFFFFFFFFFFFFFA. That's a big enough number that it's unreasonable to type without scientific notation :) • #### Re: (Score:3) Not so unreasonable to copy and paste, though: 18,446,744,073,709,551,610 • #### Re:Just be happy they weren't using 64-bit integer (Score:5, Funny) on Wednesday November 28, 2012 @05:50PM (#42122997) Journal That's a big enough subnet for everybody. /IPv6 humor • #### Re: (Score:2) IPV6 is 128bits. So 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses. • #### Re: (Score:2) Oh you were talking about the subnet portion. Fair enough, that is a mere 64bit. • #### SNAFU..... (Score:4, Insightful) on Wednesday November 28, 2012 @04:32PM (#42121813) ..... the word is being abused here. • #### Re: (Score:3, Insightful) by Anonymous Coward What, you think the markets aren't normally AFU? • #### Re: (Score:2, Redundant) It's not a word, it's an acronym for "situation normal, all fucked up." Seems appropriate to me. • #### Re: (Score:3) Wrong. It is a word whose first reference was an acronym, though used from the start as a word. m-w defines it: a situation marked by errors or confusion : muddle; also : an error causing such a situation <a scheduling snafu> Remember kids, etymology is fun and educational but it should not be used as a guide for the definition of a word. Instead... use the definition as the definition. Etymology's value is historical and linguistic, not communicative. • #### Re: (Score:1) Thank you! Etymology-Man! • #### Re: (Score:2) Agreed. I think the acro-word they're looking for is FUBAR. [wikipedia.org] Although the authorities believe the CAN fix it. So "Beyond all repair" may not be literally true. • #### Mismatched types in caller/callee: Re:SNAFU..... (Score:4, Insightful) on Wednesday November 28, 2012 @07:04PM (#42123985) SNAFU = Situation Normal: All Fucked Up. That seems like the perfect description of what happened, either in terms of bad coding without type checking or input validation or in terms of the stock exchanges so frequently doing stupid things these days. . I think most likely it's a case of mismatched types between the calling function and how the function itself defines the calling variables. Errors that occured (possibly) (is there a link to the description/report that shows how this really happened?): . 1 -- No Sanity Checking at Broker's end of transaction request: no validation of input at the customer or broker's computer, thus allowing a negative number entry for amount of shares to sell by the broker. aka Trusting the user to not input stupid values into a field. 2 -- Poor division of actionsactually not spliiting BUY and SELL into two different transaction categories and letting the sign of the number be the indicator as to the intent to buy or sell 3 -- Allowing wild extrema and outliers to affect trading: it's crazy to allow BID/buy orders at (average sale price)\dividedby(large positive integer) or to allow ASK/sell orders at (average sale price)\times(large positive integer). It's crazy for algorithms or humans to interpret any buy or sell price requests that are more than 50% deviated from the current running average price to be considered as anything other than either an anomaly or a deliberate attempt to fuck things up. 4 -- No sanity checking at the Stock Exchange board computer:no bounds checking on the board computer that accepts the buy/sell from the brokers. seriously, shouldn't there have been at least two places this poor interpretation could have been caught? 5 -- Unit Error / Representation Error: like letting a spacecraft go lost or kablooey by thinking the units are Imperial instead of Metric/Systeme_Internationale, maybe the order entry system represents the number X as signed long integer value, and the order-taker system (who knows what it's really called?) at the exchange interprets the number X as unsigned long integer value. ;>) Now that number (5) error seems likely to me, as I have been learning C programmng and note that since it does not do type checking, it's possible to call a function with a variable that is holding a signed long integer, but the program is written with a unsigned int functionname(unsigned long c1) { \\... code goes here } \\... more intervening stuff signed long int yabbadabbadoo = -6; signed long int resultinganswer = 0; resultinganswer=functionname(yabbadabbadoo); so the same bit-representation is seen as two things. Akin to using the same words to mean two different things. • #### Re: does not do type checking (Score:3) C does indeed do type checking; the issue here is that there are a number of implicit conversions (coercions) defined by the language. You can enable warnings in many compilers that will flag potential problems caused by such coercions (for example, '-Wconversion' in gcc). • #### Re: (Score:2) They mistranslated it from Swedish. It was supposed to say snafuck lol. • #### Speed at the cost of accuracy (Score:1, Insightful) by Anonymous Coward This is what happens when you want million transactions a second. You have to forgo input validation on your trading systems. Do these people ever learn? • #### Re: (Score:1) by Anonymous Coward Do you have any evidence that this bug was caused by input validation being skipped to enable high-frequency transactions? No? Didn't think so. • #### Re: (Score:3) Why bother? If something gets fucked up, Mr. Street just rolls back all the bad, and gives us another chance. No problem. • #### Different article on same website (Score:2) I have never seen that website before and decided to scroll down to see the other articles. There's a much more interesting article at the bottom titled: "The body as a network" • #### Not so local (Score:3, Informative) on Wednesday November 28, 2012 @04:36PM (#42121883) The stockholm stock exchange is part of the NASDAQ-OMX group ( http://www.nasdaqomx.com/aboutus/whatisnasdaq/ [nasdaqomx.com] ) . Do they use the same software? • #### Good Point Here (Score:2) This is why you always use dynamic storage like a link list when you potentially have to deal with numbers bigger then the address bus width. • #### Re:Good Point Here (Score:5, Funny) on Wednesday November 28, 2012 @04:52PM (#42122057) This is why you always use dynamic storage like a link list when you potentially have to deal with numbers bigger then the address bus width. Naah just use a FLOAT. After all, nothing bad could ever happen when doing financial calcs with FLOATs, right? (note to sarcasm impaired... ahh on 1.9999999nd thought forget about it) • #### Re: (Score:2) HAHA Oh of course! Also NEVER check the scope of the value stored or initialize to 0. • #### Re:Good Point Here (Score:5, Insightful) on Wednesday November 28, 2012 @04:56PM (#42122111) Homepage This is why you always use dynamic storage like a link list when you potentially have to deal with numbers bigger then the address bus width. A linked list of digits? Seems a little much given that there's data types meant to handle really big numbers. At a minimum someone should be bounds/sanity checking their inputs before it goes anywhere past the user interface -- you have to assume your users will type all sorts of random stuff into your fields. Then again, I am often surprised when testing new software that when I do something completely random I often see issues. I remember a developer saying to me once "but nobody is ever going to do that" -- the reality is, unless you actively prevent it, sooner or later they will; and in the case of many users, it's more like within the first 5 minutes. They don't know or care what you think is 'normal' inputs -- they're going to do what they do no matter what. • #### Re: (Score:2) Oh I agree that you need to scope check everything and using big data types can help. If I was working something as big and complex as a stock system I would make my own big data storage, sure a link list is over kill but if you ever think is it big enough then you need to make it bigger. • #### Re: (Score:2) Is this a troll? Not even Lisp implements bignums this way... • #### Re: (Score:2) ..... no, you program a linked list, which any first year computer student could do and use it to implement safe big number handling. C doesn't handle big numbers this way either, but you can still use it. • #### oopsie... (Score:5, Informative) on Wednesday November 28, 2012 @04:39PM (#42121919) ...someone forgot that putting an int into a function that expects a UINT32 is not a good idea.... • #### Re: (Score:2, Insightful) by Anonymous Coward If I was writing an exchange system, I'd use something like Ada, where there are well tested add-ons that let you prove the accuracy and integrity of the algorithms. In C, I almost never use signed integers. It's rare that I ever need negative values. If I'm subtracting, in the vast, vast majority of situations I expect to end up with a positive number. If the result would prove negative, something is broken. Using unsigned integers with modulo arithmetic I at least get a value in the correct domain. I only • #### Curious how they did that ... (Score:5, Interesting) on Wednesday November 28, 2012 @04:44PM (#42121985) Homepage Since I doubt you can buy -6 shares, and likely nobody had access to$69 trillion USD (including the US government)... this sounds like it was done by someone who knew it would cause problems with the system.

I don't know about most of you, but I couldn't initiate a trade for that kind of money. How could someone even do this without having some good knowledge of how the system works?

You'd really have to assume there should be some pretty obvious checks and balances in there that either weren't, or didn't trigger.

• #### Re:Curious how they did that ... (Score:5, Funny)

on Wednesday November 28, 2012 @04:50PM (#42122033)

The RIAA will have the money to do that once Napster pays up... and have $3 trillion left over • #### Re: (Score:1) by Anonymous Coward It's called a trading algorithm bug. It's not malicious intent since you'd never know how stocks change after a trade like this, so the obvious conclusion is that someone fucked up when coding their algo and as it traded it went into a stack overflow of some sort and we got this trade for -6 units, which became 4 294 967 290 units. • #### Re: (Score:2) They were trading Futures contracts, and so trading -6 contracts is routine (it's called "shorting" or "going short"). Since a Futures contract is a promise to buy/sell at some point in the future you don't have to own the underlying stock/commodity/whatever at the time you go short. Also, from the summary: "each valued at approximately 16,000 USD, giving a neat total of almost 69 trillion USD" is misleading. Futures are traded on margin so the total the total amount of cash they would have had to put up is • #### Re: (Score:2) Also, from the summary: "each valued at approximately 16,000 USD, giving a neat total of almost 69 trillion USD" is misleading. Futures are traded on margin so the total the total amount of cash they would have had to put up is orders of magnitude less. 69 trillion USD is simply the maximum they could lose. I'm sorry, but if the US GDP was 15.09 Trillion dollars in 2011 (according to google) -- there is no meaningful scenario in which a stock trade could have a potential loss (or cost) of 69 Trillion USD. You • #### Re: (Score:1) I don't disagree with you. I was trying to point out that this being a trade on a futures contract, not a stock, the summary was wrong in saying the total value of the trade was 69 trillion USD. When I said this is the "maximum they could lose" this is a theoretical upper bound which - as you rightly point out - could never be reached in reality. In any case all this is predicated on this being a genuine and intentional order which was filled and honoured by the exchange. I never claimed it was. It seems pret • #### Re: (Score:3) It is always painful coding an arbitrary maximum "I don't believe" you value though. Evidently somebody declined to do so :) • #### Re: (Score:2) > It is always painful coding an arbitrary maximum > "I don't believe you" value though. Don't I know it. Once when I was setting up a very small mail server once (think: about a dozen users), I looked at the "max number of recipients per message" variable, thought about how many distinct recipients it might potentially be reasonable to have for a single (non-mailing-list) message, and set the value to five. It was overkill, of course... Those of you who have ever run a mail server know what happened nex • #### Re:Curious how they did that ... (Score:5, Informative) on Wednesday November 28, 2012 @04:58PM (#42122139) Since I doubt you can buy -6 shares, I'm willing to bet (if only I lived in a free country where I could go on Intrade to place the bet, but I digress) that someone has a UTF-8 input field with input sanitizing that only looks for one of the bazillion "minus/dash like" glyphs and a UTF-8 to int input routine that understands all or at least most of the "minus/dash like" glyphs. Happened to me once. Of course I didn't crash a world wide financial exchange, or you would have heard about it... "Similar looking" yet different UTF-8 glyphs are one of the most exciting parts of the standard. "glyph to concept" mapping is not 1:1 any more like the old 7 bit ASCII days. • #### Re:Curious how they did that ... (Score:5, Funny) <sjc@carpa[ ].net ['net' in gap]> on Wednesday November 28, 2012 @05:38PM (#42122781) Homepage How about this scenario: "I can put in trades for any amount with this terminal" "Any amount? What happens if you put in a negative trade?" "It should kick out an error like this watch... I will place negative 6." "Hey it took it! Lol I bet you just bought 6 shares!" "Lets see it looks like it just....oh shit". • #### Re: (Score:2) Account balance =$100
-6 * $16,000$100
Transaction approved

• #### Re: (Score:2)

Since I doubt you can buy -6 shares, .

It's a future - so yes - For derivatives, for every long trade there has to be a short side. Technically it’s “Selling to Open” but I have seen systems treat it as a buying a negative quantity.

• #### Re: (Score:2)

Buying and selling are treated as separate cases on the 20 or so exchanges I have experience with.
The one area where negatives ARE used is in multi-legged instruments such as calendar spreads, but that's in the price not the quantity.

• #### Re: (Score:2)

For exchanges I would hope so.

Brokerage systems that interface with the exchange – that is a different story. Like I said, I have seen systems which make the sloppy shortcut of coding “Sell to open” as negative buys.

• #### Re: (Score:2)

I'd suspect it was triggered by a bug at a trading company with a seat on the exchange.
Some exchange protocols are in binary. The exchange may have validated only one side, assuming qtys would always be positive.

• #### Re: (Score:1)

Since I doubt you can buy -6 shares...

Not literally, but you can sell 6 shares, or you can take the "short" side of a swap, future or other derivative transaction. These are conventionally represented as negative quantities. (The math works the same, so often you actually do write it as buying -6 contracts.) And the trade in question here is futures, not plain stock, where there's both a long and short side. Way more likely this was someone who intended to go short 6 contracts and entered -6, or a bug that dropped a negative "short" quantity i

• #### Actually you can. And it was futures anyway. (Score:2)

Firstly, it's perfectly possible to buy -6 shares, it's called selling. It's even possible to buy -6 shares if you don't have any, that's called short selling and is more complicated but still possible (though illegal for some shares such as, currently, Spanish ones I believe).

• #### Re: (Score:2)

In the interest of creating a well-functioning system, I think system designers should try to catch these errors. If errors only affected the one party who made the mistake, your proposal might be worth considering, but in fact, these errors affect people who have nothing to do with it, simply because they participate in the market. Thus, it is better to eliminate errors altogether.

The most obvious fix is that negative trades should not be allowed. Even better would be a type system which expresses va
• #### New math (Score:4, Funny)

on Wednesday November 28, 2012 @04:56PM (#42122119)

Well, at least now we know how RIAA calculates its damages; They must have hired the same developer...

• #### Re: (Score:1)

Is this another way of saying, "They should be paying us to listen to this crap!"
• #### Must be a hoax (Score:3)

on Wednesday November 28, 2012 @05:02PM (#42122199) Homepage

According to most of the folks posting in another thread about computer-driven cars, programming errors rarely make it out in to the world.

Is there was an issue, it must be user error. Programmers aren't supposed to make mistakes!

<snark/>

• #### Re: (Score:3)

According to most of the folks posting in another thread about computer-driven cars, programming errors rarely make it out in to the world.

Is there was an issue, it must be user error. Programmers aren't supposed to make mistakes!

<snark/>

Nobody ever said that. What we do say is that known programming errors get fixed, known human issues do not.

While coming back from lunch today I saw somebody go through a stop sign at 40 mph and t-boning another car. Luckily everyone walked away (go modern cars and their crumple zones), and while I'm sure that particular driver will be more careful in the future, other human drivers are going to be making the same mistake forever.

A programming error causes something like this and the fix for it will be on

• #### Re: (Score:2)

Nobody ever said that. What we do say is that known programming errors get fixed, known human issues do not.

While coming back from lunch today I saw somebody go through a stop sign at 40 mph and t-boning another car. Luckily everyone walked away (go modern cars and their crumple zones), and while I'm sure that particular driver will be more careful in the future, other human drivers are going to be making the same mistake forever.

A programming error causes something like this and the fix for it will be on an update for every single other car out there. It will never happen again. Other mistakes will happen, sure, but that one is fixed forever.

*facepalm*

1) Not every known programming error gets fixed prior to release.

2) Even if 1 were not true, it's the unknown errors that will get you.

Stock exchanges have been electronic for quite some. And they process quite a large number of transactions. I did some back of envelope googling. The average trading volume of the NYSE is 700 million. Figure they're open 200 days per year, electronic trading been around maybe 20 years, maybe NYSE is 25% of the world trading (yes, I know the volume of trading th

• #### Re: (Score:2)

Er, that's more that 1 trading system. Plus this wasn't a bug in a US equities exchange.
Also, GP was saying a bug in a piece of software only needs to get fixed once, he never said that was before release.

• #### 64-bit (Score:2)

Thank goodness they weren't using 64-bit unsigned integers!

... an order to sell short 6 futures that the user inadvertently entered into the 'buy' field?

• #### Monster Orders upholstered Exchange (Score:2)

I love automated translation.

• #### Re: (Score:2)

I just figured "upholstered" was slang over there, like "plastered" in the US. Love it. A great day for words over here -- first escape goat [slashdot.org], now this. :-)

• #### I did something like that once... (Score:1)

Dial up BBS with time limits; but you could gamble an amount of time for a 1 in 3 chance of getting double the time...

So I gambled -50,000 minutes.

And lost.

Which gave me 100,000 minutes.

Which overflowed the 16 bit counter.

Which crashed the BBS.

Which dumped me into a remote shell.

• #### -6? Not always... (Score:2)

(0xfffffffa or -6 if treated as a 32-bit signed integer)

In two's complement, sure. But this is Slashdot, pedantry is allowed, even encouraged.

• #### Are you guys ( and girl ) sure this was a mistake? (Score:5, Interesting)

on Wednesday November 28, 2012 @05:36PM (#42122745) Homepage Journal
It did, after all, influence trading. What if this stunt was disguised as an - admittedly stupid - mistake, but in fact wasn't one ?
• #### Just wrote a 2500 pg paper on flash trading (Score:2, Interesting)

For an ethics class. The only real solution is to ban it outright. These algorithms can never be fully tested because they interact with algorithms from other institutions which can lead to death spirals as algorithms cause feedback loops; bouncing trades off of one another until someone pulls the plug. And at automated speeds, that can be long after your company goes bankrupt.

From the sounds of the translated page, this was just a one-shot jacked up algorithm working in isolation which is still a proble

• #### Re:Just wrote a 2500 pg paper on flash trading (Score:5, Funny)

on Wednesday November 28, 2012 @07:12PM (#42124087)
Re:Just wrote a 2500 pg [page?] paper on flash trading
.
Dude, you must be tired. 2500 pages? Or did you really mean 2500 words? Or was this a deliberate attempt to add to the humor by using the wrong units with the number? Or an amusing way to show how easily errors can slip by humans? Or just a result of tired-ness after typing and proof-reading that 2500 page essay?
;>)
• #### Re: (Score:2)

lol didn't even see that. 2500 WORD!!!!!

• #### Re: (Score:1)

How is this an ethical matter? Or more precisely, how are people studying ethics qualified to speak about what is really a matter of finance or economics?

It's not like in (academic) finance and economics they ignore the overall net benefit of trading rules to society. In fact, this is usually all that is considered.

• #### Re: (Score:2)

You're assuming that the professor has a doctorate in ethics. Ethical issues of flash trading off the top of my head:

* Flash trading violates the "spirit" of stock markets by allowing flash traders to exploit price swings not related to market fundamentals. The purpose of stock markets is to place capital in the hands of industry, not game the system.
* Flash trading favors extremely well funded organizations that h

• #### Re: (Score:1)

The professor's degree isn't really what is important, what is important is whether the issues belong to ethics or economics. E.g. would you say that the decision between using drug A and drug B to treat an illness was an ethical issue, because using the wrong one would cause less people to become better?

Furthermore, you are making some wrong assumptions. E.g. you say that "The purpose of stock markets is to place capital in

• #### Re: (Score:2)

How is this an ethical matter? Or more precisely, how are people studying ethics qualified to speak about what is really a matter of finance or economics?

It's not like in (academic) finance and economics they ignore the overall net benefit of trading rules to society. In fact, this is usually all that is considered.

Finance and economics are not divorced from ethics. And the finance industry's self-policing of its own practices and ethics hasn't worked out too well. Nationalise the lot of the bastards.

The stock exchange is supposed to be about providing finance for companies, not generating ourobos-like activity for its own sake. If shares in Company A are traded back and forth in their millions over a millisecond and the share value goes up or down by 5%, this has precisely no connection to the actual value of C

• #### Re: (Score:2)

This is not true. While complicated software can be difficult to test, and really complicated software can often only be evaluated empirically, straightforward, mathematical software you care deeply about can be reasoned about formally, even in the presence of unusual inputs. Quantifying the behavior of algorithms is, in fact, the purpose of computer science. I don't have a deep knowledge of financial algorithms, but it would surprise me if their analysis was markedly different from other algorithms. Of
• #### Looking good, Billy Ray! (Score:1)

Ripple effects are pretty scary. Good thing trading can be halted to let problems subside.

• #### Immutable arbitrary-precision integers (Score:2)

Nowadays, with the speed of CPUs, any financial application should use immutable arbitrary-precision integers (or floats). I worked for many banks and it was funny how either they found out by themselves before I got there or when I I had to tell them about it. Either way, they had to modify existing applications.

There is no limit to the number one can express that way, put apart memory constraints. Just restraint input to some number equals to the estimated number of atoms in the universe and you should be

• #### Back in the mists of time... (Score:2)

Dial up BBS with time limits; but you could gamble an amount of time for a 1 in 3 chance of getting double the time...

So I gambled -50,000 minutes.

And lost.

Which gave me 100,000 minutes.

Which overflowed the 16 bit counter.

Which crashed the BBS.

Which dumped me into a remote shell.

That kinda thing happens when you write your own BBS software...

• #### Ah, for the good ol' days... (Score:2)

It is with some smugness that I think back to the good old days, when this kind of things were always written in COBOL - it's clunky and wonky and not at all funky, but it does have one advantage:

http://en.wikipedia.org/wiki/Binary-coded_decimal [wikipedia.org]

In COBOL this is built in at the level of syntax and very, very easy to use, and you don't end up with binary overrun.

Hah, they don't make 'em like they used to. (I've just become a granddad, so I have the right to say this sort of thing).

• #### This has happened before (Score:2)

Apparently the programmers never played Mordor 1. They had a glitch where you could create a real character and a dump character and then trade the dump character a negative money amount so their balance would be heavily negative while you actually got the positive opposite. I think that game came out like 12 year ago, lol.

#### Related LinksTop of the: day, week, month.

Whom computers would destroy, they must first drive mad.

Working...