Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Why computers suck at maths 
Author Message
I haven't seen my friends in so long
User avatar

Joined: Thu Jun 18, 2009 5:10 pm
Posts: 5836
Reply with quote
A thought-triggering article

http://www.techradar.com/news/computing ... ths-644771

_________________
Jim

Image


Thu Oct 29, 2009 3:30 pm
Profile
I haven't seen my friends in so long
User avatar

Joined: Fri Apr 24, 2009 6:37 am
Posts: 6954
Location: Peebo
Reply with quote
The bit about the patriot missile system was a little alarming.

_________________
When they put teeth in your mouth, they spoiled a perfectly good bum.
-Billy Connolly (to a heckler)


Thu Oct 29, 2009 6:51 pm
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:58 pm
Posts: 8767
Location: behind the sofa
Reply with quote
Quote:
it's probably more accurate to say that computer programmers suck at maths – or at least some of them do.

At least the summary isn't misleading.

When writing multi-million pound life endangering mission critical control systems, it would be best if the programmer can maths. Sadly, such people are in short supply. It's amazing how few people understand fully the sometimes dramatic consequences of rounding off, and how they may often be avoided by simply doing a calculation in a different order.

Even when a true professional writes code, there are often time and budget constraints which mean it's released before it's ready. When code runs into millions of lines, it's not possible to guarantee 100% accuracy because it would be obsolete before the tests were complete. Some bugs are inevitable. However, something like that incremental clock bug in the Patriot targeting system was just idiotic by design.

I suspect the fatal overflow in the Ariane V was probably brought about by trying to stretch the performance of the available hardware to the limits. *wikis*

wiki wrote:
A data conversion from 64-bit floating point value to 16-bit signed integer value to be stored in a variable representing horizontal bias caused a processor trap (operand error) because the floating point value was too large to be represented by a 16-bit signed integer. The software was originally written for the Ariane 4 where efficiency considerations (the computer running the software had an 80% maximum workload requirement) led to 4 variables being protected with a handler while 3 others, including the horizontal bias variable, were left unprotected because it was thought that they were "physically limited or that there was a large margin of error".


In other words, the computer wasn't fast enough to do it more thoroughly. There are often compromises on the bleeding edge of technology, and the logic sounds acceptable.

However:

wiki wrote:
The software, written in Ada, was included in the Ariane 5 through the reuse of an entire Ariane 4 subsystem despite the fact that the particular software containing the bug, which was just a part of the subsystem, was not required by the Ariane 5 because it has a different preparation sequence[8] than the Ariane 4.


LOLWTF. :?

_________________
jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly."

When you're feeling too silly for x404, youRwired.net


Thu Oct 29, 2009 10:44 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Jun 18, 2009 5:10 pm
Posts: 5836
Reply with quote
wiki wrote:
The software, written in Ada, was included in the Ariane 5 through the reuse of an entire Ariane 4 subsystem despite the fact that the particular software containing the bug, which was just a part of the subsystem, was not required by the Ariane 5 because it has a different preparation sequence[8] than the Ariane 4.

Given that Ada is a piece is of piss to debug, how the hell was this missed?

:o

_________________
Jim

Image


Thu Oct 29, 2009 11:42 pm
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:58 pm
Posts: 8767
Location: behind the sofa
Reply with quote
rustybucket wrote:
wiki wrote:
The software, written in Ada, was included in the Ariane 5 through the reuse of an entire Ariane 4 subsystem despite the fact that the particular software containing the bug, which was just a part of the subsystem, was not required by the Ariane 5 because it has a different preparation sequence[8] than the Ariane 4.

Given that Ada is a piece is of piss to debug, how the hell was this missed?

:o

Because the code wasn't even looked at. It was a known working subsystem with a proven track record. It was treated as a black box.

People often use library routines which contain redundant code, and it usually doesn't matter.

_________________
jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly."

When you're feeling too silly for x404, youRwired.net


Thu Oct 29, 2009 11:45 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Jun 18, 2009 5:10 pm
Posts: 5836
Reply with quote
JJW009 wrote:
rustybucket wrote:
wiki wrote:
The software, written in Ada, was included in the Ariane 5 through the reuse of an entire Ariane 4 subsystem despite the fact that the particular software containing the bug, which was just a part of the subsystem, was not required by the Ariane 5 because it has a different preparation sequence[8] than the Ariane 4.

Given that Ada is a piece is of piss to debug, how the hell was this missed?

:o

Because the code wasn't even looked at. It was a known working subsystem with a proven track record. It was treated as a black box.

People often use library routines which contain redundant code, and it usually doesn't matter.

Reusing code is fine if you're talking about a device driver or a GUI but this wasn't. This was an aerospace subsystem written in a specialist language and installed in a multi-billion pound space vehicle.

If the vehicle was to be that important and expensive, short cuts should not have been acceptable.

_________________
Jim

Image


Fri Oct 30, 2009 12:38 am
Profile
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 4876
Location: Newcastle
Reply with quote
Given my dissertation/final year project is on test generation I can completely see why this was not discovered (as far as the google bug of 599 999 999 999 999 - 599 999 999 999 998 = 0 goes)

If you look at testing 2 integers where
a - b = c

Then you have 5 million possibilities for a, 5 million possibilities for b

Testing every possible combination, that gives over a quintillion (1 x10 ^ 18) possible combinations

Assuming each test is automated and takes 1 second to run each test you are looking at 32 billion years to run the tests JUST for a - b = c, that doesn't even include the time taken to verify each answer is correct.

Programmers take short cuts or use unsafe code. Always have and always will until they are made accountable for their errors

_________________
Twitter
Charlie Brooker:
Macs are glorified Fisher-Price activity centres for adults; computers for scaredy cats too nervous to learn how proper computers work; computers for people who earnestly believe in feng shui.


Fri Oct 30, 2009 12:55 am
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:58 pm
Posts: 8767
Location: behind the sofa
Reply with quote
rustybucket wrote:
Reusing code is fine if you're talking about a device driver or a GUI but this wasn't. This was an aerospace subsystem written in a specialist language and installed in a multi-billion pound space vehicle.

If the vehicle was to be that important and expensive, short cuts should not have been acceptable.

Clearly, you're quite correct.

To be honest, without knowing all the details of what the sub system actually did I don't think it's fair to judge the decisions made at the time. Frankly, even presented all the information there are few of us qualified to criticise it. However, on the surface it does appear likely that the decision was based on cost and time rather than best engineering practice. Unfortunately, I suspect these kind of shortcuts happen all too often - even in expensive and critical projects found in aerospace and other industries.

Lets hope the computer systems in our nuclear power stations aren't cobbled together from old bits of code to meet deadlines. Actually, let's hope they were mechanically engineered to be fail-safe regardless.

Coder: "I need a year to complete the project"
Manager: "We launch in 2 weeks"

_________________
jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly."

When you're feeling too silly for x404, youRwired.net


Fri Oct 30, 2009 1:06 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 5288
Location: ln -s /London ~
Reply with quote
Grrrr, I really want to comment here, but can't :(

_________________
timark_uk wrote:
Gay sex is better than no sex

timark_uk wrote:
Edward Armitage is Awesome. Yes, that's right. Awesome with a A.


Fri Oct 30, 2009 9:42 am
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:58 pm
Posts: 8767
Location: behind the sofa
Reply with quote
EddArmitage wrote:
Grrrr, I really want to comment here, but can't :(

Because of the official secrets act, or can't you say?

_________________
jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly."

When you're feeling too silly for x404, youRwired.net


Fri Oct 30, 2009 5:52 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Jun 18, 2009 5:10 pm
Posts: 5836
Reply with quote
He could tell you but then he'd have to kill you.

;)

_________________
Jim

Image


Fri Oct 30, 2009 5:57 pm
Profile
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 4876
Location: Newcastle
Reply with quote
rustybucket wrote:
He could tell you but then he'd have to kill you.

;)


That's a risk I'm willing to take, he can tell us then kill JJ ;)

_________________
Twitter
Charlie Brooker:
Macs are glorified Fisher-Price activity centres for adults; computers for scaredy cats too nervous to learn how proper computers work; computers for people who earnestly believe in feng shui.


Sat Oct 31, 2009 12:41 am
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Jun 18, 2009 5:10 pm
Posts: 5836
Reply with quote
finlay666 wrote:
rustybucket wrote:
He could tell you but then he'd have to kill you.

;)


That's a risk I'm willing to take, he can tell us then kill JJ ;)


rustybucket wrote:
He could tell thee but then he'd have to kill thee.

;)

Altered for clarity ;)

_________________
Jim

Image


Sat Oct 31, 2009 1:29 am
Profile
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 4876
Location: Newcastle
Reply with quote
rustybucket wrote:
rustybucket wrote:
He could tell thee but then he'd have to kill thee.

;)

Altered for clarity ;)


Tell everyone! It'll be like putting the ring video on youtube!

_________________
Twitter
Charlie Brooker:
Macs are glorified Fisher-Price activity centres for adults; computers for scaredy cats too nervous to learn how proper computers work; computers for people who earnestly believe in feng shui.


Sat Oct 31, 2009 1:41 am
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:58 pm
Posts: 8767
Location: behind the sofa
Reply with quote
finlay666 wrote:
rustybucket wrote:
rustybucket wrote:
He could tell thee but then he'd have to kill thee.

;)

Altered for clarity ;)


Tell everyone! It'll be like putting the ring video on youtube!

I'm guessing you've seen this, so for those who have not:

Image

_________________
jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly."

When you're feeling too silly for x404, youRwired.net


Sun Nov 01, 2009 4:02 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 16 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.