Follow TV Tropes

Following

6÷2(1+2) (A math topic)

Go To

Pykrete NOT THE BEES from Viridian Forest Since: Sep, 2009
NOT THE BEES
#76: Apr 30th 2011 at 8:43:59 PM

Yeah, I only bother with pow if I'm entering a complex expression or an ugly pile of dereferences I don't want to type twice [lol]

Usht Lv. 3 Genasi Wizard from an arbitrary view point. Since: Feb, 2011
Lv. 3 Genasi Wizard
#77: Apr 30th 2011 at 8:47:43 PM

So is "6÷2(1+2)" equivalent to "6/(2*(1+2))" or "(6/2)*(1+2)"?

Waiting for an answer from Tom and only Tom because you're unclear as mud in the first post.

The thing about making witty signature lines is that it first needs to actually be witty.
Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
DUMB
#78: Apr 30th 2011 at 8:48:55 PM

I really don't see what's hard to understand about «it's hard to understand, so rewrite it».

[1] This facsimile operated in part by synAC.
Pykrete NOT THE BEES from Viridian Forest Since: Sep, 2009
NOT THE BEES
#79: Apr 30th 2011 at 8:55:45 PM

the reason they use that convention in Excel is that it's the convention that everyone uses

You might be putting entirely too much faith in the company that gave us "biliseconds".

BlackHumor Unreliable Narrator from Zombie City Since: Jan, 2001
#80: Apr 30th 2011 at 9:01:29 PM

Okay.

See, we're far enough from the original argument that I can concede a point and still have the original argument remain intact. And I don't really care what Microsoft's position on this is either way.

I'm convinced that our modern day analogues to ancient scholars are comedians. -0dd1
Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
BlackHumor Unreliable Narrator from Zombie City Since: Jan, 2001
#82: Apr 30th 2011 at 9:04:46 PM

I don't know! And I don't care! tongue

I'm convinced that our modern day analogues to ancient scholars are comedians. -0dd1
GreatLich Since: Jun, 2009
#83: Apr 30th 2011 at 9:08:11 PM

Waiting for an answer from Tom and only Tom because you're unclear as mud in the first post.
That's the joke.

Usht Lv. 3 Genasi Wizard from an arbitrary view point. Since: Feb, 2011
Lv. 3 Genasi Wizard
#84: Apr 30th 2011 at 9:40:08 PM

Yes, and it was quite unfunny on top of that.

The thing about making witty signature lines is that it first needs to actually be witty.
Sandbylur Since: Jun, 2009
#85: Apr 30th 2011 at 11:36:50 PM

[up][up][up][up][up][up][up] Everyone, without exception, understands that. We all figure if we encounter such a problem in Real Life, we'll pass it off as ambiguous and either abandon it or ask for clarifications. Everyone but you has moved on to much more interesting problem of which answer it should be.

AndrewGPaul Since: Oct, 2009
#87: May 1st 2011 at 1:10:48 AM

[up][up]

You can't decide which answer it "should be" until you agree what the question "should be", though. Anway, apparently this thread has gone past that, into bickering over programming notation.

Sandbylur Since: Jun, 2009
#88: May 1st 2011 at 1:56:11 AM

[up]That was implied (though maybe not as much as I thought). If we figure out how to resolve the ambiguity (answering what the question should be) then the answer is unambiguous

Medinoc from France (Before Recorded History)
#89: May 1st 2011 at 3:01:43 AM

At first I thought the answer was one, but after reading the question I realized it was actually nine, because there are no explicit parentheses around "2(1+2)".

And my TI-89 agrees with me.

"And as long as a sack of shit is not a good thing to be, chivalry will never die."
Carciofus Is that cake frosting? from Alpha Tucanae I Since: May, 2010
Is that cake frosting?
#90: May 1st 2011 at 3:12:02 AM

Just another example of why Polish notation is superior. No ambiguity!

Though you can overdo it. I think I remember a book - by Prior, perhaps - which dealt with a family of fairly interesting temporal logics using (non-reverse) Polish notation, using capital letters for logical operators and using small letters for variables. There was no ambiguity in operation order, but the formulas looked like random keyboard mashes...

edited 1st May '11 3:20:54 AM by Carciofus

But they seem to know where they are going, the ones who walk away from Omelas.
vijeno from Vienna, Austria Since: Jan, 2001
#91: May 1st 2011 at 3:42:58 AM

I'm sticking with 42.

And also, RPN FTW!!!

6 2 / 1 2 + *

6 2 1 2 + * /

edited 1st May '11 3:43:11 AM by vijeno

del_diablo Den harde nordmann from Somewher in mid Norway Since: Sep, 2009
Den harde nordmann
#92: May 1st 2011 at 4:41:14 AM

Ok.
6÷2(1+2) = 6/(2*1+2*2) = 6/6 = 1, this is one answer.
The other way of doing this is to write it as (6/2)*(1+2). 3*1+3*2=9.
I would say the first method is correct, because the second method requires that one splits up the equation.

A guy called dvorak is tired. Tired of humanity not wanting to change to improve itself. Quite the sad tale.
Carciofus Is that cake frosting? from Alpha Tucanae I Since: May, 2010
Is that cake frosting?
#93: May 1st 2011 at 6:03:14 AM

^^ Eh, I find direct Polish notation more readable - I mean, you can just read the expression aloud and make sense of it, without needing to build stacks of inputs and keep track of their order.

In PN, * / 6 2 + 1 2 is read as "multiply the division of 6 by 2 and the sum of 1 and 2" and / 6 * 2 + 1 2 is read as"divide 6 by the product of two and of the sum of 1 and 2": this quite simpler than the equivalent RPN expressions, I think...

edited 1st May '11 6:04:42 AM by Carciofus

But they seem to know where they are going, the ones who walk away from Omelas.
Yej See ALL the stars! from <0,1i> Since: Mar, 2010
See ALL the stars!
#94: May 1st 2011 at 6:10:09 AM

[up] But RPN is easier for your Friend, the Computer to read. Besides, stacks aren't that bad... tongue

edited 1st May '11 6:10:23 AM by Yej

Da Rules excuse all the inaccuracy in the world. Listen to them, not me.
Carciofus Is that cake frosting? from Alpha Tucanae I Since: May, 2010
Is that cake frosting?
#95: May 1st 2011 at 6:18:30 AM

My Friend The Computer has 2 GB of RAM and can make I-forgot-how-many-gazillions integer operations per second. I don't. tongue

Plus, keeping track of stacks of numbers gets confusing pretty quickly - I mean, in 6 2 1 2 + * /, could you tell at a glance what subexpressions the * operator is applied to?

edited 1st May '11 6:19:25 AM by Carciofus

But they seem to know where they are going, the ones who walk away from Omelas.
vijeno from Vienna, Austria Since: Jan, 2001
#96: May 1st 2011 at 6:24:36 AM

[up][up] PN does require a stack, doesn't it? Or maybe even two stacks... Okay, I'll admit I'm automatically trying to create a parser for it in my head, and RPN is just a bit easier to parse...

/ -> push to op stack

  • 6 -> push to value stack, check whether top of op stack is unary op
  • 2 -> push to value stack, check whether top of op stack is unary op
  • check whether top of op stack is binary op -> yes, pop 2 values from values stack, pop 1 op from op stack, push to values stack

compared to RPN:

  • 6 -> push
  • 2 -> push
  • / -> perform op, i.e. pop pop div push

eeeeewwwwwwwwwww...

Okay. We're soooo OT now... sorry.

Well, and let me add that I'm not serious about promoting stack-based languages. I love them for their geekiness and obscurity, and it might be beneficial to teach their fundamentals in schools so people realize the arbitrary nature of mathematical notation; but I wouldn't dream of actually wanting them in the mainstream.

edited 1st May '11 6:26:24 AM by vijeno

Yej See ALL the stars! from <0,1i> Since: Mar, 2010
See ALL the stars!
#97: May 1st 2011 at 6:31:54 AM

[up] Yeah, I can't work out how to parse PN without discrete tokens, stacks and recursion, which makes me think I'm doing something wrong. At least RPN is simple to write a parser for. (whereas proper mathematics is nicer when you have an sense of the geometry of the page.)

Anywho, the original question isn't well-formed. We might as well be arguing, "Do curious green ideas sleep furiously?"

edited 1st May '11 6:33:13 AM by Yej

Da Rules excuse all the inaccuracy in the world. Listen to them, not me.
Carciofus Is that cake frosting? from Alpha Tucanae I Since: May, 2010
Is that cake frosting?
#98: May 1st 2011 at 6:36:56 AM

^^ Yeah, it does - instead of having a stack of numbers, you have a stack of operations (where things such as "multiply 6 by the next number", or "* 6", count as operations).

Mostly, it seems to me that it is easier to individuate subexpressions in PN than in RPN.

Perhaps this has some linguistic basis? My native language has SVO order, but it elides the subject often enough - definitely more so than English - and therefore constructions of the form

Verb Object Complement1 Complement2 ...
look very natural to me.

I wonder if people whose first languages have SOV orders perceive this otherwise... Question for German or Japanese native speakers: what is easier to understand, PN or RPN?

Since Polish is also a pro-drop language, the fact that PN was developed before RPN would make sense under this hypothesis...

edited 1st May '11 6:48:28 AM by Carciofus

But they seem to know where they are going, the ones who walk away from Omelas.
vijeno from Vienna, Austria Since: Jan, 2001
#99: May 1st 2011 at 6:41:57 AM

I'm austrian (ie german-speaking, SVO-but-not-in-relative-clauses), and to me it's definitely RPN. But I've worked on a few forth interpreters for fun, so I prolly can't speak for the general public...

Carciofus Is that cake frosting? from Alpha Tucanae I Since: May, 2010
Is that cake frosting?
#100: May 1st 2011 at 6:44:49 AM

Oh, right, I forgot that German is SOV only in relative clauses, sorry :(

But they seem to know where they are going, the ones who walk away from Omelas.

Total posts: 175
Top