Forum menu
....only if you follow the convention of reading from left to rightAnd: if you read the question to someone out loud, the answer would be zero
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.
42
elf's quiet.....
Thankfully
Probably off spoiling someone else's thread, which he didn't understand either.
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.
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"
[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?
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?
Johnners - thank you for your correction, in this forum of idiots it was silly of me to leave anything to chance.
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.
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.
I'm whole heartedly accepting your correction Johnners. My omission of the equals sign was entirely unacceptable.
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?
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.
BTW - my scientific calculator says it's zero.
All that demostrates is that you don't know how to use your calculator properly.
"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.
.
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.
It's a convention to tell you where the parentheses are. Not maths.
Operator precedence is part of maths.
GrahamS may be an Apple loving freak, but he's 100% right on the fact that the convention [b]is[/b] maths.
isn't maths
pedant point - correct isn't it arithmetic?
pedant point - correct isn't it arithmetic?
Arithmetic is a "branch" of mathematics 😉
teamhurtmore - MemberIs 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...
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.
maths
Or math?
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 🙂
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.
ebygomm... I have no idea what you could mean...
😉
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)
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.
Born to a math[b]s[/b] teacher, it's 26 🙂
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]
?
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.
elf's quiet.....
ThankfullyProbably 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)
[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.
Jotter?
[i]Jotter[/i]???
Gis it ear...
(Grabs it, sets light to it)
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
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.
(Grabs it, sets light to it)
Nooooooo.... Optimuuuuussssss.... Bumblebee.... Shockwave... ... whyyyyyyy?
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.
111111111x111111111=
No calculators.
[i]financial, military and medical embedded software[/i]
all at once? that must be confusing?
123456..[i]can't be arsed counting the 1's[/i]....654321
all at once? that must be confusing?
Yep. Soldier gets shot and we work out if the budget will cover his medical expenses 😀