• OT: Calling mathematicians (there may be some in this group)

    From NY@21:1/5 to All on Mon Jul 31 21:36:13 2023
    I've seen a question which was apparently a Who Wants to be a Millionaire question. It gives four answers for

    -6² (or -6^2 if the superscript 2 character doesn't reproduce)

    Without any brackets, how should this be parsed? -(6^2) or (-6)^2. In other words, is the answer +36 or -36?

    For what it's worth, three of the four answers were 12, -12 and 12i (I
    presume they are using i as sqrt(-1)) so the correct answer stands out. It would have been more cunning if the four answers had been 12, -12, 36, -36.


    My gut feeling is that the expression should be parsed as (-6)^2 = 36, but
    from comments in the Facebook posting where it is discussed, it seems I'm
    wrong and the expression should be parsed as -(6^2) = -36. Of course, I
    would never rely on implied rules and would always use brackets to indicate
    my meaning, even if they were technically superfluous.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Theo@21:1/5 to me@privacy.invalid on Mon Jul 31 22:00:58 2023
    NY <me@privacy.invalid> wrote:
    I've seen a question which was apparently a Who Wants to be a Millionaire question. It gives four answers for

    -6² (or -6^2 if the superscript 2 character doesn't reproduce)

    Without any brackets, how should this be parsed? -(6^2) or (-6)^2. In other words, is the answer +36 or -36?

    The order of precedence goes:

    Brackets
    Order (=exponents or powers)
    Division
    Multiplication
    Addition
    Subtraction

    so the 'order' takes precedence over 'subtraction', and you would do (6*6)
    and then make the result negative, ie -36.

    Let's confirm that:

    $ python3 -i
    Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    -6**2
    -36
    (-6)**2
    36

    ** is the 'to the power of' operator in Python. In the second example the brackets take precedence over order.

    Theo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From NY@21:1/5 to Theo on Mon Jul 31 22:13:05 2023
    "Theo" <theom+news@chiark.greenend.org.uk> wrote in message news:I9j*cHGmz@news.chiark.greenend.org.uk...
    NY <me@privacy.invalid> wrote:
    I've seen a question which was apparently a Who Wants to be a Millionaire
    question. It gives four answers for

    -6² (or -6^2 if the superscript 2 character doesn't reproduce)

    Without any brackets, how should this be parsed? -(6^2) or (-6)^2. In
    other
    words, is the answer +36 or -36?

    The order of precedence goes:

    Brackets
    Order (=exponents or powers)
    Division
    Multiplication
    Addition
    Subtraction

    so the 'order' takes precedence over 'subtraction', and you would do (6*6) and then make the result negative, ie -36.

    Let's confirm that:

    $ python3 -i
    Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    -6**2
    -36
    (-6)**2
    36

    ** is the 'to the power of' operator in Python. In the second example the brackets take precedence over order.

    Ah, I wasn't sure whether the "-" as a prefix to the 6 was treated the same
    as a minus operator (as in 6-4=2), or whether it was an unstated case that
    was higher up the BODMAS list.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Liz Tuddenham@21:1/5 to me@privacy.invalid on Tue Aug 1 08:51:53 2023
    NY <me@privacy.invalid> wrote:

    "Theo" <theom+news@chiark.greenend.org.uk> wrote in message news:I9j*cHGmz@news.chiark.greenend.org.uk...
    NY <me@privacy.invalid> wrote:
    I've seen a question which was apparently a Who Wants to be a Millionaire >> question. It gives four answers for

    -6Â" (or -6^2 if the superscript 2 character doesn't reproduce)

    Without any brackets, how should this be parsed? -(6^2) or (-6)^2. In
    other
    words, is the answer +36 or -36?

    The order of precedence goes:

    Brackets
    Order (=exponents or powers)
    Division
    Multiplication
    Addition
    Subtraction

    so the 'order' takes precedence over 'subtraction', and you would do (6*6) and then make the result negative, ie -36.

    Let's confirm that:

    $ python3 -i
    Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    -6**2
    -36
    (-6)**2
    36

    ** is the 'to the power of' operator in Python. In the second example the brackets take precedence over order.

    Ah, I wasn't sure whether the "-" as a prefix to the 6 was treated the same as a minus operator (as in 6-4=2), or whether it was an unstated case that was higher up the BODMAS list.

    I think the answer is to ask them to specify what system they are using
    or tell them to write it properly with the appropriate brackets.
    Without that information the answer is guesswork and the question is
    just a waste of everyone's time.


    --
    ~ Liz Tuddenham ~
    (Remove the ".invalid"s and add ".co.uk" to reply)
    www.poppyrecords.co.uk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jon@21:1/5 to All on Tue Aug 1 08:06:46 2023
    On Mon, 31 Jul 2023 21:36:13 +0100, NY wrote:

    - 6²= 36
    -(6)²= -36

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Burns@21:1/5 to Liz Tuddenham on Tue Aug 1 09:21:06 2023
    Liz Tuddenham wrote:

    NY wrote:

    -6^2 Without any brackets, how should this be parsed? -(6^2) or (-6)^2.

    I think the answer is to ask them to specify what system they are using
    or tell them to write it properly with the appropriate brackets.
    Without that information the answer is guesswork and the question is
    just a waste of everyone's time.

    With this type of question, *not* stating it clearly is a deliberate
    ploy to generate argument and discussion.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robin@21:1/5 to Liz Tuddenham on Tue Aug 1 09:48:43 2023
    On 01/08/2023 08:51, Liz Tuddenham wrote:
    NY <me@privacy.invalid> wrote:

    "Theo" <theom+news@chiark.greenend.org.uk> wrote in message
    news:I9j*cHGmz@news.chiark.greenend.org.uk...
    NY <me@privacy.invalid> wrote:
    I've seen a question which was apparently a Who Wants to be a Millionaire >>>> question. It gives four answers for

    -6Â" (or -6^2 if the superscript 2 character doesn't reproduce)

    Without any brackets, how should this be parsed? -(6^2) or (-6)^2. In
    other
    words, is the answer +36 or -36?

    The order of precedence goes:

    Brackets
    Order (=exponents or powers)
    Division
    Multiplication
    Addition
    Subtraction

    so the 'order' takes precedence over 'subtraction', and you would do (6*6) >>> and then make the result negative, ie -36.

    Let's confirm that:

    $ python3 -i
    Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information. >>>>>> -6**2
    -36
    (-6)**2
    36

    ** is the 'to the power of' operator in Python. In the second example the >>> brackets take precedence over order.

    Ah, I wasn't sure whether the "-" as a prefix to the 6 was treated the same >> as a minus operator (as in 6-4=2), or whether it was an unstated case that >> was higher up the BODMAS list.

    I think the answer is to ask them to specify what system they are using
    or tell them to write it properly with the appropriate brackets.
    Without that information the answer is guesswork and the question is
    just a waste of everyone's time.


    "Properly" is using brackets only where they are necessary. If you
    don't then you'd better use brackets consistently in all such cases else
    the reader can't be sure what you want.

    E.g. if I saw -(6^2) I'd be unsure what was meant by 3/(136-6^2).



    --
    Robin
    reply-to address is (intended to be) valid

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Liz Tuddenham@21:1/5 to Andy Burns on Tue Aug 1 10:00:23 2023
    Andy Burns <usenet@andyburns.uk> wrote:

    Liz Tuddenham wrote:

    NY wrote:

    -6^2 Without any brackets, how should this be parsed? -(6^2) or (-6)^2.

    I think the answer is to ask them to specify what system they are using
    or tell them to write it properly with the appropriate brackets.
    Without that information the answer is guesswork and the question is
    just a waste of everyone's time.

    With this type of question, *not* stating it clearly is a deliberate
    ploy to generate argument and discussion.

    I appreciate that it is supposed to be entertainment, but that
    particular question leaves no room for any real discussion. The answer
    is indisputable once the system is known, so it is just a matter of
    guessing which system the question-setter used. Tossing a coin would be
    just as interesting.

    As I was never very good a mathematics, I tend to use brackets quite
    liberally in equations, so there is never any doubt about my intentions (particularly as I am liable to forget what those were when I try to
    read the programs a few days later). The down-side of this is the risk
    of losing count of the depth of nesting and then having the program fail because there was a bracket missing or duplicated.


    --
    ~ Liz Tuddenham ~
    (Remove the ".invalid"s and add ".co.uk" to reply)
    www.poppyrecords.co.uk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robin@21:1/5 to jon on Tue Aug 1 09:52:46 2023
    On 01/08/2023 09:06, jon wrote:
    On Mon, 31 Jul 2023 21:36:13 +0100, NY wrote:

    - 6²= 36
    -(6)²= -36


    so what's 100 - 6² ?

    --
    Robin
    reply-to address is (intended to be) valid

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From NY@21:1/5 to All on Tue Aug 1 10:53:34 2023
    "Robin" <rbw@outlook.com> wrote in message news:5e080482-3f3a-1ddd-9dbe-69e61671bedb@outlook.com...

    E.g. if I saw -(6^2) I'd be unsure what was meant by 3/(136-6^2).

    I think 3/(136-6^2) is unambiguous by BODMAS rules: you square the 6 first
    and then subtract it from the 136, because the "-" is the binary operator between 136 and 6^2. -6^2 is more debatable: is the unary operator "-" a property of the number 6, implying that you square -6, or is it a property
    of the term 6^2?

    I would make a distinction between the binary operator "-" in "136-36" and
    the unary operator "-" in "-6". But evidently I'm wrong to do so. I'm guilty
    of over-thinking things ;-)

    It's probably one of those situations where you could make a strong case
    either way and you need to be taught which way happens to be the convention.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Adrian Caspersz@21:1/5 to All on Tue Aug 1 11:23:07 2023
    On 8/1/23 10:53, NY wrote:
    "Robin" <rbw@outlook.com> wrote in message news:5e080482-3f3a-1ddd-9dbe-69e61671bedb@outlook.com...

    E.g. if I saw -(6^2) I'd be unsure what was meant by 3/(136-6^2).

    I think 3/(136-6^2) is unambiguous by BODMAS rules: you square the 6
    first and then subtract it from the 136, because the "-" is the binary operator between 136 and 6^2. -6^2 is more debatable: is the unary
    operator "-" a property of the number 6, implying that you square -6, or
    is it a property of the term 6^2?

    I would make a distinction between the binary operator "-" in "136-36"
    and the unary operator "-" in "-6". But evidently I'm wrong to do so.
    I'm guilty of over-thinking things ;-)

    It's probably one of those situations where you could make a strong case either way and you need to be taught which way happens to be the
    convention.

    Folks these days are "taught" by whatever their calculator tells them.

    Pressing the keys in sequence gives 36.

    It is fact, gospel, the unshakable truth ...


    The square root of minus 1 is etched in my mind as "error".

    --
    Adrian C

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From NY@21:1/5 to Adrian Caspersz on Tue Aug 1 14:01:13 2023
    "Adrian Caspersz" <email@here.invalid> wrote in message news:kis4obFfjhuU3@mid.individual.net...
    The square root of minus 1 is etched in my mind as "error".

    The word is divided into three types of people: mathematicians who call it
    "i", electrical engineers who call it "j" and the rest who call it "error"
    ;-)

    My head of department in an electronics firm was called Bill Taylor - James William Taylor. It didn't take people long to realise that he was destined
    for a job in electronics because his initials jwt spelled the mathematical
    term that appears in equations of sinusoidal variation of electric currents.
    He was referred to as "J Omega".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robin@21:1/5 to All on Tue Aug 1 14:43:15 2023
    On 01/08/2023 14:01, NY wrote:
    "Adrian Caspersz" <email@here.invalid> wrote in message news:kis4obFfjhuU3@mid.individual.net...
    The square root of minus 1 is etched in my mind as "error".

    The word is divided into three types of people: mathematicians who call
    it "i", electrical engineers who call it "j" and the rest who call it
    "error" ;-)


    I never knew a physicist call it "error".

    --
    Robin
    reply-to address is (intended to be) valid

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stephen Wolstenholme@21:1/5 to email@here.invalid on Tue Aug 1 15:07:34 2023
    On Tue, 1 Aug 2023 11:23:07 +0100, Adrian Caspersz
    <email@here.invalid> wrote:


    The square root of minus 1 is etched in my mind as "error".

    --
    It can also be i or j

    --
    Neural Network Software for Windows http://www.npsnn.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From J. P. Gilliver@21:1/5 to Adrian Caspersz on Tue Aug 1 15:17:49 2023
    In message <kis4obFfjhuU3@mid.individual.net> at Tue, 1 Aug 2023
    11:23:07, Adrian Caspersz <email@here.invalid> writes
    On 8/1/23 10:53, NY wrote:
    "Robin" <rbw@outlook.com> wrote in message >>news:5e080482-3f3a-1ddd-9dbe-69e61671bedb@outlook.com...

    E.g. if I saw -(6^2) I'd be unsure what was meant by 3/(136-6^2).
    I think 3/(136-6^2) is unambiguous by BODMAS rules: you square the 6 >>first and then subtract it from the 136, because the "-" is the binary >>operator between 136 and 6^2. -6^2 is more debatable: is the unary
    operator "-" a property of the number 6, implying that you square -6,
    or is it a property of the term 6^2?
    I would make a distinction between the binary operator "-" in
    "136-36" and the unary operator "-" in "-6". But evidently I'm wrong
    to do so. I'm guilty of over-thinking things ;-)
    It's probably one of those situations where you could make a strong
    case either way and you need to be taught which way happens to be the >>convention.

    Folks these days are "taught" by whatever their calculator tells them.

    Pressing the keys in sequence gives 36.

    It is fact, gospel, the unshakable truth ...


    The square root of minus 1 is etched in my mind as "error".

    Simple calculators implement the operations as you give them them.
    "Scientific" ones _sometimes_ implement some degree of BODMAS. The one
    in Windows can be set to various modes.

    Even "pressing the keys" is open to interpretation, especially if your calculator has a "change sign" key (often labelled "+/-") as well as a "subtract" key. Would you enter -6^2 as subtract, six, squared, or six,
    negate, squared, or six, squared, negate? (Assuming you have a "squared"
    key. Same question applies if you have a ^ key [usually "xy" with the y raised].)
    --
    J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

    How do you govern a country that seems to have decided that facts are the work of the devil? - Andy Hamilton on HIGNFY, 2010

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From NY@21:1/5 to J. P. Gilliver on Tue Aug 1 16:47:05 2023
    "J. P. Gilliver" <G6JPG@255soft.uk> wrote in message news:T80jZasNQRykFwqN@255soft.uk...
    Even "pressing the keys" is open to interpretation, especially if your calculator has a "change sign" key (often labelled "+/-") as well as a "subtract" key. Would you enter -6^2 as subtract, six, squared, or six, negate, squared, or six, squared, negate? (Assuming you have a "squared"
    key. Same question applies if you have a ^ key [usually "xy" with the y raised].)

    I can remember by dad bringing home from work a Hewlett Packard calculator
    with reverse Polish notation. That confused the crap out of anyone who tried
    to use it:

    7 ENTER 3 *

    rather than

    7 * 3 =

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)