

Swedish Exchange paralyzed by buy order for "-6 stocks" - ComputerGuru
http://translate.google.com/translate?sl=sv&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fwww.svd.se%2Fnaringsliv%2Fnyheter%2Fsverige%2Fmonsterorder-stoppade-borsen_7708362.svd&act=url

======
crntaylor
In case anyone is perplexed by the "-6" comment, the decimal number -6
represented as a signed int in twos complement is

    
    
        11111111111111111111111111111010
    

When interpreted as an unsigned int, this is 4,294,967,290 = 2^32 - 6.

------
unwind
As a native Swedish speaker, I was curious to see how well the auto-translator
would handle this rather niche financial text.

The wording "The value of words corresponding to" in the second sentence
confused me, but I first chalked it up to me not understanding finance-speak
in English well enough.

Then I realized hovering shows the original text, and investigated. The
original Swedish text has a typo! It says "orden" (="the words") where it
should say "ordern" (="the [purchase] order").

I found that amusing. :)

~~~
rpm4321
Just curious, how accurate was the rest of the translation?

~~~
unwind
Well, for a translation about finance it is (very!) surprising that it seems
to have just transformed "kronor" (="crowns", the everyday name for the SEK,
the Swedish currency) into "dollars". It's not as they two currencies are 1:1,
or even close to it. Very strange.

Also there was a Swedish word that was just copied ("anullerades", meaning
more or less "cancelled", "voided" or something along those lines) into the
English text.

But, overall, it's still rather impressive.

~~~
waitwhat
I can confirm the translating-names-of-currencies issue, but something even
worse is that the _names of languages_ can also be similarly converted.

For example, the word "Eesti" will often get Google-Translated to "English"
rather than "Estonian".

This means that a film at my local cinema that my web browser assures me is in
"English" will in fact be in Estonian. And an interview with a Russian saying
that he doesn't speak Estonian gets translated so that he appears to say that
he doesn't speak English.

The product designers special-cased language names, doing extra work to
produce what will almost always be the wrong result.

(And what they can do to place names is often patently ridiculous. For
example, "Peterburi tee" should either be left alone or maybe translated to
"St Petersburg Road" but actually somehow becomes "Hertford Road". And the ZIP
+ City name "13415 Tallinn" becomes "thirteen thousand four hundred and
fifteen Tallinn".)

~~~
taejo
> The product designers special-cased language names, doing extra work to
> produce what will almost always be the wrong result.

They absolutely did _not_ do this. It's an artefact of statistical
translation. In the corpus there are a lot of English documents saying "This
document is in English", whose translated versions in Afrikaans (because I
know Afrikaans) say "Hierdie dokument is in Afrikaans". Thus the translator
learns the "hierdie" is Afrikaans for "this", "dokument" is "document, ...,
and "English" is "Afrikaans".

The street name issue probably comes from an organisation whose Estonian
office is in Peterburi tee and whose English office is in Hertford Road.

------
proemeth
"Sweden's gross domestic product, by comparison, amounted in 2011 to more than
3500 billion."

The irony.

Looks like a typo, it should be around 500bn$. 3500 would be Germany. Proof
that "fat finger" human mistakes can do as much damage as algos gone wild.

~~~
sesqu
As mentioned in another comment, it's not a typo, it's a translation error.
It's actually 3500 billion SEK, which is roughly 500 billion USD.

------
rbanffy
Remember all those compiler warnings about mixing signed and unsigned
integers? Now you know why.

------
LarryMade
In the stock market there are no sanity checks, else the whole thing would
grind to a halt. :-)

------
raverbashing
And that's why you should _always_ use unsigned ints

And put sensible limits and checks in processing untrusted data (that is,
everything that comes from the outside)

~~~
CJefferson
Actually, I find you should always use signed ints.

With signed ints, you can notice that '2-3' has below 0, and act accordingly.
If you do '2-3' with unsigned ints, there is not really any way of finding out
something went wrong (other than looking for very large numbers).

Of course, particularly in a financal system, you should probably use an
integer type which throws/aborts if an out-of-bounds error occurs.

~~~
mbesto
And this is why I almost always never trust advice that has the words 'always'
and 'never'.

------
qvaetrain
where did the -6 come from?

~~~
srijan4
I'm guessing because 4294967290 = 2^32 - 6

~~~
belorn
I guess someone wanted to buy 6 stocks, pressed wrong and made -6, and the
program did not have any data checks and sent it to the market.

~~~
rpm4321
Well, they're going to have a lot of explaining to do when a dump truck shows
up outside of their house with 4,294,967,290 stock certificates.

~~~
jws
Like: What happened to the street when a dump truck loaded with 8500 tons of
paper drove down it leaving deep trenches through the pavement.

4,294,967,290 at one sheet of paper per share is about one entire freight
train of box cars. Depending on the paper.

------
darylteo
Equivalence class testing, yo.

