Slashdot Mirror


Why Computers Suck At Math

antdude writes "This TechRadar article explains why computers suck at math, and how simple calculations can be a matter of life and death, like in the case of a Patriot defense system failing to take down a Scud missile attack: 'The calculation of where to look for confirmation of an incoming missile requires knowledge of the system time, which is stored as the number of 0.1-second ticks since the system was started up. Unfortunately, 0.1 seconds cannot be expressed accurately as a binary number, so when it's shoehorned into a 24-bit register — as used in the Patriot system — it's out by a tiny amount. But all these tiny amounts add up. At the time of the missile attack, the system had been running for about 100 hours, or 3,600,000 ticks to be more specific. Multiplying this count by the tiny error led to a total error of 0.3433 seconds, during which time the Scud missile would cover 687m. The radar looked in the wrong place to receive a confirmation and saw no target. Accordingly no missile was launched to intercept the incoming Scud — and 28 people paid with their lives.'"

6 of 626 comments (clear)

  1. Re:Poor QA by Anonymous Coward · · Score: 0, Troll

    I'm sure had *you* been on the team, this never would have happened eh? All the other problems associated with making a missile do what no other missile had done before, what many, many people said could not be done, you would have solved all those problems too eh?

    What's pathetic are Monday Morning Quarterbacks who get winded just getting up for a beer.

  2. Re:Curse of binary floating point by stonefoz · · Score: 0, Troll

    Fixed point? What would that accomplish? Rounding creep happens, irregardless of data type, every time it rounds the last digit, fixed or float.
    Fixed point is never a good idea, bad idea or not, it does speed up things on limited hardware. A missile isn't "budget" though.
    Yes floats are difficult, every operation moves it farther from original guess, it's just guessing the last digit. Only solutions are to not do fractional math at all, or to reload and adjust values periodically. Time keeping however is a subject that been already well researched. Any embedded platform I've seen has at least a dozen app-notes and a dozen different ways to keep accurate time.

    --
    I think I just cashed out all my cool points.
  3. Re:"User error"? by Hurricane78 · · Score: 1, Troll

    Yep. That was a epic fail.

    The rule is: If a user *can* do something wrong, he *will*!

    How can they not know that?

    --
    Any sufficiently advanced intelligence is indistinguishable from stupidity.
  4. Re:Fixed point numbers? by dword · · Score: 0, Troll

    What the fuck is this? Who the hell even THOUGHT of putting this on Slashdot? It's common knowledge among slashdotters, because most of us are programmers or have dealt with programming in our past and by "most" I mean 999/1000 (no joke intended). You can find this in absolutely any book that explains how computer math works. You can find this information all over the Internet and in tons of books. This is not news, it's just a reminder for beginner programmers who've used computers for only a few months. In school we used to do jokes like these, showing our class mates that the Calculator in Windows was broken and the teachers always explained to us why they were broken. My parents who only use Yahoo! Messenger at home and Excel at work know this.

    I know that journalism is sensationalism, but this story just plain sucks.

    Fuck you and you shitty news, Slashdot! I've had enough of your crap and I'm OUT OF HERE. Seriously, how do I delete my Slashdot username?

  5. Re:Patriot success rate was likely extremely infla by Philip+K+Dickhead · · Score: 1, Troll

    Look. When the system is named "Patriot", you already have enough information to understand the framing context - if you care to have the particular insight. This is a propaganda tool, like the rockets launched from Airstrip One.

    It fulfilled its mission when it was designed, manufactured and labeled as "The Patriot Missile System". Ballistic interception is a secondary mission and fulfillment is unnecessary for success.

    --
    "Speaking the Truth in times of universal deceit is a revolutionary act." -- George Orwell
  6. Re:Poor QA by Jane+Q.+Public · · Score: 0, Troll

    They didn't. Puhleeeeeze read the article, people. Even though the article itself appears to (inappropriately) blame the programmers, the timing error was due to a clock that did not keep accurate time! It was NOT a rounding error or floating-point error. The problem was in the design of the system.