Often you see questions on social media such as - find the answer to 9/3(1+2) (they usually use the divide symbol which nobody uses of course so= I have replaced it with a slash) and they spout on about order of operations and so left to right the answer= is 3x 3 =3D9 and the catch is that people answer 9/9 =3D 1. Ha, they don't= know their order of operations which was agreed by convention in 1916 or s= omething. Well is that right? Of course when programming in matlab or a computer language we would do 9/3*(1+2)=3D9 and we get 9. If we wanted the other answer we would put 9/(3*91+2)) To make things confusing though, if you type into a calculator 9/3(1+2) it may well give you 1 but if you enter 9/3x(1+2) you get 9. It appears that the calculator engineers are using Juxtaposition and assume= that the 3(1+2) is all together whereas adding the x sign reverts to so ca= lled Bodmas. Now if I showed you this equation x=3D1/ab where a=3D1 and b=3D2 you may well say the answer is 0.5 because = you assume the ab is together. Whereas under the order of operations you ge= t 1x 2 =3D 2. To avoid confusion of course very few people would write 1/ab and instead w= rite it as a fraction. If the writer had wanted an answer 2 then he would w= rite x=3Db/a surely and not x=3D1/ab.=20 Conclusion, yes it's good and important to know the order of operations, es= pecially when programming, but when ever possible brackets should be used t= o avoid confusion and hammering such problems into kids brains may well cau= se confusion in later life. I found journals that use Juxtaposition in phys= ics all the time.

# OT: Those arithmetic questions

Started by ●January 23, 2018

Posted by ●January 23, 2018

<gyansorova@gmail.com> wrote:>Now if I showed you this equation>x=1/ab where a=1 and b=2 you may well say the answer is 0.5 because you >assume the ab is together. Whereas under the order of operations you get >1x 2 = 2.>To avoid confusion of course very few people would write 1/ab and >instead write it as a fraction. If the writer had wanted an answer 2 >then he would write x=b/a surely and not x=1/ab.x=1/ab is neither fish now fowl: It is not an expresion in a programming language, unless you simply have a variable called "ab", as opposed to an implicit multiply, but that's not what you're going for. Nor is it properly typset mathematical notation, since in that context there is no "/" character for division. Instead, a horizontal line means division and has lower operator precedence. But what it's closest to is an ASCII rendering of mathematical notation, as opposed to a programming language expression. So in this case, the value is 0.5. Steve

Posted by ●January 24, 2018

On Wednesday, January 24, 2018 at 9:44:45 AM UTC+13, Steve Pope wrote:> <gyansorova@gmail.com> wrote: > > >Now if I showed you this equation > > >x=1/ab where a=1 and b=2 you may well say the answer is 0.5 because you > >assume the ab is together. Whereas under the order of operations you get > >1x 2 = 2. > > >To avoid confusion of course very few people would write 1/ab and > >instead write it as a fraction. If the writer had wanted an answer 2 > >then he would write x=b/a surely and not x=1/ab. > > x=1/ab is neither fish now fowl: > > It is not an expresion in a programming language, unless you simply > have a variable called "ab", as opposed to an implicit multiply, > but that's not what you're going for. > > Nor is it properly typset mathematical notation, since in that context > there is no "/" character for division. Instead, a horizontal line > means division and has lower operator precedence. > > But what it's closest to is an ASCII rendering of mathematical > notation, as opposed to a programming language expression. > So in this case, the value is 0.5. > > SteveHere the / denotes the divide symbol used in schools which I can't type at the keyboard.

Posted by ●January 24, 2018

On 2018-01-24 04:08, gyansorova@gmail.com wrote:> On Wednesday, January 24, 2018 at 9:44:45 AM UTC+13, Steve Pope wrote: >> <gyansorova@gmail.com> wrote: >> >>> Now if I showed you this equation >> >>> x=1/ab where a=1 and b=2 you may well say the answer is 0.5 because you >>> assume the ab is together. Whereas under the order of operations you get >>> 1x 2 = 2. >> >>> To avoid confusion of course very few people would write 1/ab and >>> instead write it as a fraction. If the writer had wanted an answer 2 >>> then he would write x=b/a surely and not x=1/ab. >> >> x=1/ab is neither fish now fowl: >> >> It is not an expresion in a programming language, unless you simply >> have a variable called "ab", as opposed to an implicit multiply, >> but that's not what you're going for. >> >> Nor is it properly typset mathematical notation, since in that context >> there is no "/" character for division. Instead, a horizontal line >> means division and has lower operator precedence. >> >> But what it's closest to is an ASCII rendering of mathematical >> notation, as opposed to a programming language expression. >> So in this case, the value is 0.5. >> >> Steve > > Here the / denotes the divide symbol used in schools which I can't type at thekeyboard.>What he is trying to tell is that you've to type the symbols consistently. Writing "ab", can be "a*b" or "ab" as single value. As well "/" does mean ":" or the full fraction. For example x=1:a*b it is pretty clear, I guess. 1 x = ----- a b Should be clear too. Mixing things together, on the other hand, can only lead to confusion, as you already noticed. bye, -- piergiorgio

Posted by ●January 24, 2018

On Thursday, January 25, 2018 at 7:08:01 AM UTC+13, Piergiorgio Sartor wrote:> On 2018-01-24 04:08, gyansorova@gmail.com wrote: > > On Wednesday, January 24, 2018 at 9:44:45 AM UTC+13, Steve Pope wrote: > >> <gyansorova@gmail.com> wrote: > >> > >>> Now if I showed you this equation > >> > >>> x=1/ab where a=1 and b=2 you may well say the answer is 0.5 because you > >>> assume the ab is together. Whereas under the order of operations you get > >>> 1x 2 = 2. > >> > >>> To avoid confusion of course very few people would write 1/ab and > >>> instead write it as a fraction. If the writer had wanted an answer 2 > >>> then he would write x=b/a surely and not x=1/ab. > >> > >> x=1/ab is neither fish now fowl: > >> > >> It is not an expresion in a programming language, unless you simply > >> have a variable called "ab", as opposed to an implicit multiply, > >> but that's not what you're going for. > >> > >> Nor is it properly typset mathematical notation, since in that context > >> there is no "/" character for division. Instead, a horizontal line > >> means division and has lower operator precedence. > >> > >> But what it's closest to is an ASCII rendering of mathematical > >> notation, as opposed to a programming language expression. > >> So in this case, the value is 0.5. > >> > >> Steve > > > > Here the / denotes the divide symbol used in schools which I can't type at thekeyboard.> > > > What he is trying to tell is that you've to > type the symbols consistently. > > Writing "ab", can be "a*b" or "ab" as single value. > As well "/" does mean ":" or the full fraction. > > For example x=1:a*b it is pretty clear, I guess. > > 1 > x = ----- > a b > > Should be clear too. > > Mixing things together, on the other hand, can only > lead to confusion, as you already noticed. > > bye, > > > -- > > piergiorgioSure, it's not what we know that I am commenting about though, it is how kids at school are taught read this mathematicians comments https://math.berkeley.edu/~gbergman/misc/numbers/ord_ops.html

Posted by ●February 2, 2018

On 01/24/2018 06:48 PM, gyansorova@gmail.com wrote:> Sure, it's not what we know that I am commenting about though, it is how kids atschool are taught> > read this mathematicians comments > > https://math.berkeley.edu/~gbergman/misc/numbers/ord_ops.html > > >As in a lot of the discussions on this topic, I see that article refer to PEMDAS. Its usually described as something pretty old, that all school kids are taught. Was anyone here taught PEMDAS? I certainly wasn't. I've always read a / as pretty much "put the stuff to the left of the '/' over the stuff to the right of it", which is definitely not what PEMDAS says. Most of what has been written actually uses the traditional divide symbol, rather than a slash, but some writers are using / and the traditional divide symbol completely interchangeably. At the end of the day, anyone writing expressions for consumption by others should never be too conservative about the liberal use of parentheses. Steve

Posted by ●February 2, 2018

On 02/02/18 10:07, Steve Underwood wrote:> On 01/24/2018 06:48 PM, gyansorova@gmail.com wrote: >> Sure, it's not what we know that I am commenting about though, it is how >> kids at school are taught >> >> read this mathematicians comments >> >> https://math.berkeley.edu/~gbergman/misc/numbers/ord_ops.html >> >> >> > As in a lot of the discussions on this topic, I see that article refer to > PEMDAS. Its usually described as something pretty old, that all school kids > are taught. Was anyone here taught PEMDAS? I certainly wasn't.I, and everyone else of my age, was taught BEDMAS, which is the same thing. That's not to say everyone remembered it. Even teachers can and do think 1+2*3 is 9.> I've always read a / as pretty much "put the stuff to the left of the '/' > over the stuff to the right of it", which is definitely not what PEMDAS says. > Most of what has been written actually uses the traditional divide symbol, > rather than a slash, but some writers are using / and the traditional divide > symbol completely interchangeably.So what? It is your right to be wrong :)> At the end of the day, anyone writing expressions for consumption by others > should never be too conservative about the liberal use of parentheses.Anyone confusing arithmetic and computer arithmetic will, sooner rather than later, be bitten by that error.

Posted by ●February 2, 2018

On 02/02/2018 02:07 PM, Tom Gardner wrote:> On 02/02/18 10:07, Steve Underwood wrote: >> On 01/24/2018 06:48 PM, gyansorova@gmail.com wrote: >>> Sure, it's not what we know that I am commenting about though, it is how >>> kids at school are taught >>> >>> read this mathematicians comments >>> >>> https://math.berkeley.edu/~gbergman/misc/numbers/ord_ops.html >>> >>> >>> >> As in a lot of the discussions on this topic, I see that article refer to >> PEMDAS. Its usually described as something pretty old, that all school >> kids >> are taught. Was anyone here taught PEMDAS? I certainly wasn't. > > I, and everyone else of my age, was taught BEDMAS, which is the same thing. > That's not to say everyone remembered it. Even teachers can and do think > 1+2*3 is 9.I just asked my children, who are 18 and 20. They had never heard of PEMDAS or BEDMAS as mnemonics. They do, however, know that 1+2*3 is 7. Its just division that makes things woolly. Steve

Posted by ●February 2, 2018

On 02/02/18 15:30, Steve Underwood wrote:> On 02/02/2018 02:07 PM, Tom Gardner wrote: >> On 02/02/18 10:07, Steve Underwood wrote: >>> On 01/24/2018 06:48 PM, gyansorova@gmail.com wrote: >>>> Sure, it's not what we know that I am commenting about though, it is how >>>> kids at school are taught >>>> >>>> read this mathematicians comments >>>> >>>> https://math.berkeley.edu/~gbergman/misc/numbers/ord_ops.html >>>> >>>> >>>> >>> As in a lot of the discussions on this topic, I see that article refer to >>> PEMDAS. Its usually described as something pretty old, that all school kids >>> are taught. Was anyone here taught PEMDAS? I certainly wasn't. >> >> I, and everyone else of my age, was taught BEDMAS, which is the same thing. >> That's not to say everyone remembered it. Even teachers can and do think 1+2*3 >> is 9. > > I just asked my children, who are 18 and 20. They had never heard of PEMDAS or > BEDMAS as mnemonics. They do, however, know that 1+2*3 is 7. Its just division > that makes things woolly.It doesn't. It really doesn't!

Posted by ●February 2, 2018

Steve Underwood wrote:> On 02/02/2018 02:07 PM, Tom Gardner wrote: >> On 02/02/18 10:07, Steve Underwood wrote: >>> On 01/24/2018 06:48 PM, gyansorova@gmail.com wrote: >>>> Sure, it's not what we know that I am commenting about though, it is >>>> how >>>> kids at school are taught >>>> >>>> read this mathematicians comments >>>> >>>> https://math.berkeley.edu/~gbergman/misc/numbers/ord_ops.html >>>> >>>> >>>> >>> As in a lot of the discussions on this topic, I see that article >>> refer to >>> PEMDAS. Its usually described as something pretty old, that all >>> school kids >>> are taught. Was anyone here taught PEMDAS? I certainly wasn't. >> >> I, and everyone else of my age, was taught BEDMAS, which is the same >> thing. >> That's not to say everyone remembered it. Even teachers can and do >> think 1+2*3 is 9. > > I just asked my children, who are 18 and 20. They had never heard of > PEMDAS or BEDMAS as mnemonics. They do, however, know that 1+2*3 is 7. > Its just division that makes things woolly. > > Steve >1+2*3 with a classic stack-based Push Down Automata algebraic calculator will yield 9. So I'd say it is *at best* ambiguous. -- Les Cargill