Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

What is 6 - 1 x 0 + 2 / 2 ? 17

Status
Not open for further replies.

charliealphabravo

Structural
May 7, 2003
796
0
16
US
OK, so my architect boss is trying to stump me with this one. He says he saw it on some discussion group that was saying that engineers are poor in math because they answer 7. That was my answer as well, and since I am an engineer I must ergo be bad at math.

I am pretty sure there is no planet where the answer to this is 5, but what do I know?

Discuss.
 
Replies continue below

Recommended for you

7

----------------------------------------

The Help for this program was created in Windows Help format, which depends on a feature that isn't included in this version of Windows.
 
I've never heard of PEMDAS: had to look it up. I learnt it as BODMAS.

What's interesting is that I was taught that O stood for of, an alternative to multiplication: not order (equivalent of exponents). Guess it is a bit difficult teaching a 6 year old what exponent means.
 
I never heard of either of them til now, and managed to learn order of operations without them. Perhaps misleading acronyms should be retired.

Is there really any controversy here? Except for a few wisecracks, did anyone here really think the answer was not 7?

If you like controversy, I offer:

-3^2=?
 
Is there really any controversy here?

The only controversy seems to be whether the whole discussion is a complete waste of time, or whether it is something worth talking about.

In my opinion it is worth talking about, if only as a reminder that we should not assume our non-engineer colleagues are numerate.

Doug Jenkins
Interactive Design Services
 
If you like controversy, I offer:

-3^2=?

Interestingly, if you enter -3^2 in Lotus 123 it tells you the answer is -9. If you save the file as xls and open in Excel it still says -9, but it now displays in the edit box as =-(3^2).

1-3^2 = -8 in both programs, so Excel doesn't need to add any brackets in this case.

Doug Jenkins
Interactive Design Services
 
XWB. I also learned it as BODMAS, which I suspect shows both our ages. The O does stand for "of", and I never understood why "of" should have any priority over other ways of expressing a multiplication operation.

As for the absence of exponentiation in that aide-memoire, I suspect it comes about because way back then (at school level at least) exponentiation was denoted without any operator at all (3[sup]2[/sup] rather than 3^2) so the issue did not arise. Also, as has already been pointed out above, we are talking here about a cryptic aide-memoire to (parts of) the universal convention, not the formal definition of the full convention.
 
The minus sign unary operator subject has been beat to death a couple of times in the spreadsheet forum already. PEMDAS resolves both expressions, differently, but resulting in the same end result.

TTFN
faq731-376
7ofakss
 
The minus sign unary operator subject has been beat to death a couple of times in the spreadsheet forum already. PEMDAS resolves both expressions, differently, but resulting in the same end result.

I'm not sure how one spreadsheet giving 9 and another one giving -9 for the same input is "resulting in the same end result".

Doug Jenkins
Interactive Design Services
 
They're both wrong.

"People will work for you with blood and sweat and tears if they work for what they believe in......" - Simon Sinek
 
The 5 is the result of the architect's quote maths
The 7 is actual maths

We now know why architectural projects are over budget most of the time!

Daniel D
 
I joined the forum simply because of this question.
I had originally said the answer was 5.
I work in CNC Machining and lines of code and be interpreted differently by different machine drivers.

A very basic yet extreme example with something like 6-0+5 could be interpreted by the computer saying "ok, well everything after the - is negative". Ok, bear with me I know there's a zero there. Some lines of code will literally drop a zero or "uncheck" it as if each character in a line were on a checklist.

Some lines of code won't be interpreted until after each character is accounted for, the driver processes whatever algorithm and creates a result.

A CNC operator may look at this as "blocks" of code. Some drivers will group long lines of code into smaller ones.

One of my biggest arguments is that a machine cannot do "0" or nothing. It could very easily read this and say "subtract zero? I can't do that...hmm but I have to subtract something so I'll go to the next character set".

The obvious answer is 7, but I think there is a valid argument for 5 under certain circumstances and even 1 which would be strictly left-to-right.

By the way- the #1 answer on Facebook in USA was 1. Go figure.

Does any of this make sense or am I trying to validate something that isn't there?
 
That is an interesting new perspective, Adamshive.

Also very worrying. It would seem that the CNC industry wants to re-write the long-standing conventions of mathematics, but does not even have a consistent convention to offer as an alternative.

How is this problem currently dealt with, out there at the coal face?
 
Haha, well it's not rewriting math it's just turning into code that a post-processor can understand.

In the early days on NC machines a single line of text was punched into a ticker-tape which would then be optically processed by the machine. The roots of these unique codes could well be in those single lines but that was way before my time.

I guess it really is comparing apples to oranges since its essentially and industry-specific language but I thought it was funny that I dropped the 0 without batting an eyelash.

Something else interesting that we see almost every day is how we're taught to round up so many decimal spaces while some processors simply drop decimal spaces. So 9.9969 is 9.996 to some computers when we'd just round up to 9.997. Since our tolerances are ridiculously small- single digit microns- you can see where it can be a pain.

Also the "order of execution" in g-code rings a bell and I believe that is what overrides the conventions of mathematics. It's been awhile since I've used pure g-code though so don't quote me.
 
I get that; I used to program a machine that read paper tape one byte at a time (don't ask how long ago).

It's incumbent on the programmer to parse the expression correctly to ensure that they get what they want. Therefore, any decent machine language or assembly programmer knows to what to put on the stack and in what order. That's one thing that using RPN instills in you, since that's the only way to get the correct answer in RPN.

TTFN
faq731-376
7ofakss
 
I just found out that this has less (or nothing, mind you) to do with cnc code and more to do with an improper redundant zero "rule".

A friend at Harvard said that using the order of operations would get you 7. Dropping the redundant 0 gives you 5. He also mentioned a whole lot of stuff about axioms and things I didn't understand.
 
The problem, of course, is that it's not a "redundant zero", but the improper handling of the " - 0 + " sequence. You cannot eliminate the "0" without eliminating its associated "-" sign. That's just BAD MATH. Replace the "0" with "x", and you wouldn't be tempted to do that sort of nonsense, i.e., "6 - 1 * x + 2 / 2 must equal 7 - x. That clearly demonstrates that if x=0, the answer is 7, and absolutely nothing else. The rules of math must be consistent with whatever is in the "0" slot. You cannot arbitrarily change the way the equation works if x=0; that's just plain nonsensical, BAD MATH.

TTFN
faq731-376
7ofakss
 
yikes, isn't that from a movie?

...but to your point. As long as you know the rules that the CNC code interpreter is using then a programmer can get the correct answer from it. It is not really bad math and it doesn't change the order of operations required to get the correct answer.

 
It is interesting to note that a similar question on the net yielded a 73% wrong result. If math is the universal language, it should be more universally understood, and correctly.

The problem here is that the average person does not remember the "heirarchy" of the operations as it were. That is why the use of parenthesis and brackets. That nomenclature leaves absolutely no doubt of the sequence of the operations required. That's why I use them all the time - accurate communications without having to remember mankind's confusing "rules".

Mike McCann
MMC Engineering
 
Status
Not open for further replies.
Back
Top