'Surprisingly' (to me) low PF of gadgets

On the basis of a very quick look at my notes, I think that the following might (but no promises!) achieve "(6 / 2) * (1+2)" in APL ...

6 x 2 ÷ 1 + 2
But what does it do if you have it evaluate 6 ÷ 2(1+2)?
 
But what does it do if you have it evaluate 6 ÷ 2(1+2)?
My point is that APL would not understand "6 ÷ 2(1+2)", one has to tell it exactly what one wants it to do, and that would involve making one's own decision (based on current BODMAS, old BODMAS or whatever) as to what that was. As far as I can make out, APL, like RPN, requires totally explicit instructions (i.e. completely defining the step-by-step evaluation of an expression), so all the deciding has to be done by the human who instructs it (or by a pre-processor which, again, will do precisely what a human has told it to do).

Kind Regards, John
 
My point is that APL would not understand "6 ÷ 2(1+2)", one has to tell it exactly what one wants it to do, and that would involve making one's own decision (based on current BODMAS, old BODMAS or whatever) as to what that was. As far as I can make out, APL, like RPN, requires totally explicit instructions (i.e. completely defining the step-by-step evaluation of an expression), so all the deciding has to be done by the human who instructs it (or by a pre-processor which, again, will do precisely what a human has told it to do).
Decades years ago you could buy pocket calculators which could understand 6 ÷ 2(1+2).

6 ÷ 2(1+2) is an exact description, and there are rules to follow which allow it to be processed correctly.

I don't disagree with what you say about APL, but its rules require people to express calculations differently, in a way which is not the way they are used to. The same with RPN. (Although when I used to use my HP calculator on a daily basis I did get pretty good at converting to RPN on the fly).

Plenty of other high level languages have no problem with 6 ÷ 2(1+2), although they might require an explicit operator before the (.
 
6 ÷ 2(1+2) is an exact description, and there are rules to follow which allow it to be processed correctly.
I'm not sure one can call it an 'exact description' since, as we have seen, there are different sers of rules around (at least, over time) which lead to different interpretations as to how it should be interpreted. One could, of course, create a machine which had a unique understanding of what that expression meant, but humans would then have to be strict about speaking exactly that same language.
Plenty of other high level languages have no problem with 6 ÷ 2(1+2), although they might require an explicit operator before the (.
Your experience/exposure is clearly much wider than mine, because I think that most/all languages with which I have any familiarity would require that explicit operator - and I think they would then all apply (modern) BODMAS.

I have to say that I am sufficiently 'worried' by what (modern) BODMAS does with an expression like "6 ÷ 2(1+2)" [ which would probably become "6 / 2*(1+2)" for any language I use ] that I am almost obsessive in littering all but the simplest of expressions with explicit parenthesis - and I think that is probably more time-effective than scrutinising, and agonising over, what I have typed to be certain that 'it' (essentially BODMAS) was going to interpret it as I intended!

Kind Regards,
John
 
AFIC my school taught me that:
a(b+c)=(b+c)*a or in this case that's 2(1+2)=(1+2)*2=(3)*2=6
also
a(b+c)=(ab)+(ac) or in this case that's 2(1+2)=(2*1)+(2*2)=(2)+(4)=6

When the hell did it change from this?
 
Last edited:
So are we saying that at the moment we can prove (or at least demonstrate) this relatively simple calculation can be any of the following:
1, 4, 5, 6, 7, 9 or 11.

No wonder the youngsters of today sick to playing on their phones, FIFA18 or Minecraft just has to be easier.
 
AFIC my school taught me that:
a(b+c)=(b+c)*a or in this case that's 2(1+2)=(1+2)*2=(3)*2=6
also
a(b+c)=(ab)+(ac) or in this case that's 2(1+2)=(2*1)+(2*2)=(2)+(4)=6
When the hell did it change from this?
It didn't.

However, if you put "d/" in front of it, without any further brackets to clarify exactly what you mean, then, in terms of what we were all taught at school ('modern BODMAS'), and what remains correct today , is perhaps not what you would be expecting/remembering. In other words, you may well be thinking that:

d / a * (b+c) = d / [a * (b+c)]

... which is NOT what is correct (per BODMAS, which is the convention we still use). BODMAS says that Division comes before Multiplication, so d is first divided by a, after which the result is multiplied by (b+c), which has previously been calculated (since Brackets come first). In other words, if we don't use brackets to indicate that our intention is otherwise, BODMAS says that we have to assume:

d / a * (b+c) = (d/a) * (b+c)

Don't forget that we are talking about a set of conventions/rules (BODMAS) which tells us the default order in which to undertake the steps of calculation if that order has not be explicitly defined by an adequate number of brackets. It's like there being a convention/rule saying that if you order "fish and chips with vinegar and peas", without any further clarification, you should, per the rule be given:

[(fish and chips) with vinegar] and (peas)
... rather than
(fish) and (chips with vinegar) and (peas)
or
(fish and chips) with (vinegar and peas)
or
(fish and chips and vinegar and peas) - i.e. all together
... or anything else

If instructions are incomplete and one doesn't have the option to ask for clarification, there has to be some 'default convention/rule', and that will not always correspond to what was really intended. The moral therefore probably is to adopt my strategy and 'litter the expression with brackets" in order to make it unambiguously clear what one wants - then it won't be left to conventions/rules to try to read you mind.

Kind Regards, John
Edit: Crucial typo corrected (thanks for noticing, BAS!)
 
Last edited:
So are we saying that at the moment we can prove (or at least demonstrate) this relatively simple calculation can be any of the following: 1, 4, 5, 6, 7, 9 or 11.
No. If the expression is written as given, without further clarification (using brackets) as to what we actual intend (i.e. what we have written is ambiguous), then the convention that has existed throughout our lives (and a lot longer) says that we have use the default rules (specified by BODMAS) to provide 'clarification', and that results in just one correct answer, namely 9. A calculation which results in any other answer is incorrect.
No wonder the youngsters of today sick to playing on their phones, FIFA18 or Minecraft just has to be easier.
If they are taught and remember the correct rules, then it's straightforward. If they were, say, taught (or incorrectly remembered) that "9 times 7" was something other than 63, they would end up with all sorts of problems throughout life!

Everyone should probably also be taught that when writing expressions, they should do so in a manner that is totally unambiguous, without the need to rely upon any 'default rules' - in which case these 'confusions' would not exist.

Kind Regards, John
 
If they are taught and remember the correct rules, then it's straightforward.
Indeed
If they were, say, taught (or incorrectly remembered) that "9 times 7" was something other than 63, they would end up with all sorts of problems throughout life!
Do children still get to learn the times table by rote any more ? I recall we all have to learn everything up to 12x12 - though I admit that a lot of the larger numbers have since gone away through lack of use. I also recall that we were not allowed calculators until fairly late on, for the obvious reason that if you only ever use a calculator then you'll never learn to do it without.

And there is also the art of approximating to get a "near enough" answer - so you can spot if you've made a gross error while (eg) using a calculator.

Ah, nostalgia isn't what it used to be :whistle:
Everyone should probably also be taught that when writing expressions, they should do so in a manner that is totally unambiguous, without the need to rely upon any 'default rules' - in which case these 'confusions' would not exist.
There is that too.

Is this the point where we start moaning about "kids today" :mrgreen:
 

If you need to find a tradesperson to get your job done, please try our local search below, or if you are doing it yourself you can find suppliers local to you.

Select the supplier or trade you require, enter your location to begin your search.


Are you a trade or supplier? You can create your listing free at DIYnot Local

 
Back
Top