Forum menu
2+2+2+2+2+2+2+2+2+2...
 

[Closed] 2+2+2+2+2+2+2+2+2+2+2+2+2+2-2+2 x 0?

Posts: 396
Free Member
 

And: if you read the question to someone out loud, the answer would be zero
....only if you follow the convention of reading from left to right


 
Posted : 12/10/2011 10:10 am
Posts: 3314
Free Member
 

antigee
I still think that putting a space either side of the 'x' in the thread title and not around the '+'s implies a precedence (or brackets)
i suspect that in the original draft there may well have been brackets in those spaces but the legal team insisted they were removed to avoid any ambiguity

Proper tea on monitor moment there.


 
Posted : 12/10/2011 10:11 am
Posts: 0
Free Member
 

42


 
Posted : 12/10/2011 10:12 am
Posts: 9
Free Member
 

elf's quiet.....
Thankfully

Probably off spoiling someone else's thread, which he didn't understand either.


 
Posted : 12/10/2011 10:30 am
Posts: 5807
Free Member
 

try just typing it as written into excel and see what answer you get...

Tsk - [u]as written[/u] Excel will fill the cell with a text string, which doesn't move things on much. Put an equals sign in front of it and we're in business.

Type it as written into Windows calculator will get you 0.


 
Posted : 12/10/2011 10:49 am
Posts: 31206
Full Member
Topic starter
 

Type it as written into Windows calculator will get you 0.

Not on modern Windows (i.e. Windows 7)
I can even type it as written into the calculator on my phone and it correctly comes out as 26.

As someone said earlier older calculators expect you to enter stuff in the the order of evaluation, or sometimes odd orders like "45 sin"


 
Posted : 12/10/2011 10:54 am
Posts: 0
Free Member
 

[i]I can even type it as written into the calculator on my phone and it correctly comes out as 26.[/i]

which key do you press for the spaces?


 
Posted : 12/10/2011 10:57 am
Posts: 0
Free Member
 

Go to Spain. But first put the cat out.
.
If you do that from left to right you will be in Spain and the cat will locked in the house until you get back. if you read it properly and do it in the order which it tells you to the cat will be out and about before you even leave for the airport.

You can't apply linguistic rules to maths as stress and intonation will change the significance when using the spoken word.

'Record' noun or verb?
'I invited Anne to the party' which element of the sentence is more important to the speaker?
It could be argued that the spoken sum could introduce stress to denote the brackets, no?


 
Posted : 12/10/2011 11:00 am
Posts: 0
Free Member
 

Johnners - thank you for your correction, in this forum of idiots it was silly of me to leave anything to chance.


 
Posted : 12/10/2011 11:01 am
Posts: 0
Full Member
 

I have to admit, speaking as a software engineer, I would ALWAYS put brackets in anything like this. Not because the computer needs them, but because I know my fellow engineers are idiots may not have had their coffee when they read it

+1

You only have to do the sum on a cheap ass free gift calculator to see why being explicit means you're less likely to be misinterpreted.

i.e. never rely on the knowledge of others

It's like big old regexp might make perfect sense to those in sandals with socks, but I still comment them so I know what the hell I was looking for 2 years down the line without having google it.


 
Posted : 12/10/2011 11:34 am
Posts: 5807
Free Member
 

Not on modern Windows (i.e. Windows 7)

Yeah, my work laptop's running Vista.

in this forum of idiots it was silly of me to leave anything to chance

Be fair, you did specifically say "as written", and not everyone will be as familiar with Excel as you.


 
Posted : 12/10/2011 11:38 am
Posts: 0
Free Member
 

I'm whole heartedly accepting your correction Johnners. My omission of the equals sign was entirely unacceptable.


 
Posted : 12/10/2011 11:43 am
Posts: 91169
Free Member
 

I have to admit, speaking as a software engineer, I would ALWAYS put brackets in anything like this. Not because the computer needs them, but because I know my fellow engineers are idiots may not have had their coffee when they read it

+2

I recently lost a job interview on the strength of a test which included loads and loads of the programming equivalent of this kind of question. Utterly stupid, as you have to be actively trying to trick people to write code (or mathematical expressions) like this.

I am always explicit - why not be? Other than to be a smart-arse?


 
Posted : 12/10/2011 12:08 pm
Posts: 16210
Free Member
 

The answer using conventional notation is obviously 26. But as has already been pointed out - it's just a convention, not maths. The argument about maths being right or wrong is irrelevant.

BTW - my scientific calculator says it's zero.


 
Posted : 12/10/2011 12:11 pm
Posts: 3729
Free Member
 

BTW - my scientific calculator says it's zero.

All that demostrates is that you don't know how to use your calculator properly.


 
Posted : 12/10/2011 12:15 pm
Posts: 16210
Free Member
 

"All that demostrates is that you don't know how to use your calculator properly. "

I entered it in exactly the same way on excel, and got 26.

I'm perfectly aware of how to get the correct answer on my calculator. But that relies on using a convention, which as I said, isn't maths.


 
Posted : 12/10/2011 12:18 pm
Posts: 16210
Free Member
 

.


 
Posted : 12/10/2011 12:20 pm
Posts: 31206
Full Member
Topic starter
 

it's just a convention, not maths. The argument about maths being right or wrong is irrelevant.

[code]y = mx + c[/code]

So is that:

[code]y = m (x + c)[/code]

or

[code]y = (mx) + c[/code]

??

How about:
[code]1 + 3²[/code]

So is that 10 or 16?

The [i]convention[/i] [u]IS[/u] maths.


 
Posted : 12/10/2011 12:22 pm
Posts: 16210
Free Member
 

It's a convention to tell you where the parentheses are. Not maths.


 
Posted : 12/10/2011 12:33 pm
Posts: 91169
Free Member
 

Operator precedence is part of maths.


 
Posted : 12/10/2011 12:38 pm
Posts: 12088
Full Member
 

GrahamS may be an Apple loving freak, but he's 100% right on the fact that the convention [b]is[/b] maths.


 
Posted : 12/10/2011 12:38 pm
Posts: 396
Free Member
 

isn't maths

pedant point - correct isn't it arithmetic?


 
Posted : 12/10/2011 12:40 pm
Posts: 0
Free Member
 

pedant point - correct isn't it arithmetic?

Arithmetic is a "branch" of mathematics 😉


 
Posted : 12/10/2011 12:42 pm
Posts: 3539
Full Member
 

teamhurtmore - Member

Is this the perfect STW thread?

1. Deviation from MTB
2. Interesting question (albeit it with hidden trap)
3. Evidence that threads can be misinterpreted (the zeros, read this as an oral question, the 26s as a written one)
4. Errors
5. Debate
6. Abuse
7. Defensiveness
8. Bigotry
9. Ya, boo, sucks
10. Finally humour

It fails perfection on one point... It wasn't mistakenly posted in the Bike Forum...


 
Posted : 12/10/2011 12:42 pm
Posts: 1594
Full Member
 

As I said earlier... and in agreement with Graham and the others just above...

Without convention there is no mathematics.

I could work in gribbles and farks but without there being some convention that allows you to interpret what those mean, then it's pretty much all meaningless.

Oh, and it doesn't tell you where the parentheses are, they could be added in but are wholly unnecessary as the precedence of the operators already contains that information.


 
Posted : 12/10/2011 12:43 pm
Posts: 11937
Free Member
 

maths

Or math?


 
Posted : 12/10/2011 12:45 pm
Posts: 0
Free Member
 

they could be added in but are wholly necessary as the precedence of the operators already contains that information.

Wholly necessary?

Make your mind up 🙂


 
Posted : 12/10/2011 12:46 pm
Posts: 31206
Full Member
Topic starter
 

Oh, and it doesn't tell you where the parentheses are, they could be added in but are wholly [un]necessary as the precedence of the operators already contains that information.

Ed Zackerly.

Also the parentheses are part of the same "convention" anyway, as they are the P in PEMDAS (or the B in BODMAS).

If you understand that you do the bit in brackets first then you are already following [i]the convention[/i].

Or math?

Only if you study mathematic.


 
Posted : 12/10/2011 12:49 pm
Posts: 1594
Full Member
 

ebygomm... I have no idea what you could mean...

😉


 
Posted : 12/10/2011 12:51 pm
Posts: 0
Free Member
 

I only just noticed that the new windows calculator does operator precedence for you. It seems like cheating to me - you should know how to interpret it and enter it accordingly.

Just for fun I tried it in SQL Server as well:

select 2+2+2+2+2+2+2+2+2+2+2+2+2+2-2+2*0

-----------
26

(1 row(s) affected)


 
Posted : 12/10/2011 1:20 pm
Posts: 8
Full Member
 

Type it as written into Windows calculator will get you 0.

Not on modern Windows (i.e. Windows 7)

XP here. Open calculator. 'View' dropdown. Select 'scientific'. Type it in and out pop the correct answer. Which is 26.


 
Posted : 12/10/2011 1:53 pm
Posts: 0
Full Member
 

Born to a math[b]s[/b] teacher, it's 26 🙂


 
Posted : 12/10/2011 2:01 pm
Posts: 0
Free Member
 

I have to admit, speaking as a software engineer, I would ALWAYS put brackets in anything like this. Not because the computer needs them, but because I know my fellow engineers [s]are idiots[/s] may not have had their coffee when they read it

For something that complicated maybe, but would you use parentheses for
[code]output = input + offset * offsetScale;[/code]
?


 
Posted : 12/10/2011 2:01 pm
Posts: 31206
Full Member
Topic starter
 

Yeah I probably would aracer.

[code]output = input + (offset * offsetScale);[/code]

In fact our coding standards insist on it and I'd pull someone up in a code review if they didn't do it.

It shouldn't be needed, but anything that makes someone stop and think even for a second while reading simple code like that should be eliminated.


 
Posted : 12/10/2011 2:06 pm
Posts: 0
Free Member
 

elf's quiet.....
Thankfully

Probably off spoiling someone else's thread, which he didn't understand either.

Diddums. Someone stole your dinner money too? 😆

Yay! Someone has learned something. AND a pretty girl talked to me. About Maths!
My day is complete.

(Flushes Graham's head down the bogs. Tips contents of his school satchel (not sports bayg like normal kids, a flipping [i]satchel[/i] ffs...) into urinal. Gives Graham a wedgie in front of the girls. Blows smoke in Emsz' face, knowing this will undoubtedly make her fancy him)


 
Posted : 12/10/2011 2:09 pm
Posts: 31206
Full Member
Topic starter
 

[i]*sobs*[/i]

I thought we'd agree to be friends after I made you £600?

You've totally ruined my favourite jotter cover now.
My mum will be so cross.


 
Posted : 12/10/2011 2:11 pm
Posts: 0
Free Member
 

Jotter?

[i]Jotter[/i]???

Gis it ear...

(Grabs it, sets light to it)


 
Posted : 12/10/2011 2:13 pm
Posts: 12533
Full Member
 

ransos - Member
The answer using conventional notation is obviously 26. But as has already been pointed out - it's just a convention, not maths.

Maths is a collection of coventions. Some of them contradict, some of them don't. Unless you want to not care about anything with numbers in, you'd better start using the standard set of conventions for standard questions.

My answer's 32.

Base 8 and BODMAS


 
Posted : 12/10/2011 2:16 pm
Posts: 0
Free Member
 

In fact our coding standards insist on it and I'd pull someone up in a code review if they didn't do it.

Really? Fairly sure I've never had a coding standard which insisted on that. To be fair I usually do put in unnecessary braces to make it more explicit, but I doubt I would for that.


 
Posted : 12/10/2011 2:19 pm
Posts: 31206
Full Member
Topic starter
 

(Grabs it, sets light to it)

Nooooooo.... Optimuuuuussssss.... Bumblebee.... Shockwave... ... whyyyyyyy?


 
Posted : 12/10/2011 2:21 pm
Posts: 31206
Full Member
Topic starter
 

Really? Fairly sure I've never had a coding standard which insisted on that

Yep - financial, military and medical embedded software - we are pretty strict about [i]anything[/i] that can cause confusion.


 
Posted : 12/10/2011 2:24 pm
Posts: 0
Free Member
 

111111111x111111111=

No calculators.


 
Posted : 12/10/2011 2:25 pm
Posts: 251
Full Member
 

[i]financial, military and medical embedded software[/i]

all at once? that must be confusing?


 
Posted : 12/10/2011 2:27 pm
Posts: 31206
Full Member
Topic starter
 

123456..[i]can't be arsed counting the 1's[/i]....654321


 
Posted : 12/10/2011 2:28 pm
Posts: 31206
Full Member
Topic starter
 

all at once? that must be confusing?

Yep. Soldier gets shot and we work out if the budget will cover his medical expenses 😀


 
Posted : 12/10/2011 2:28 pm
Page 6 / 11