Author Topic: Exponents  (Read 12215 times)

0 Members and 1 Guest are viewing this topic.

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7192
  • Country: fi
    • My home page and email address
Re: Exponents
« Reply #50 on: April 10, 2019, 04:14:30 pm »
In general, because many programmers aren't that good at math and changing the precedence/associativity rules when your users have gotten used to them would be downright evil, one must assume that software environments do not always parse or compute expressions correctly.

You have a point there, but nevertheless it's pretty disappointing. By the same token, you could argue that one should expect some spelling errors in programming languages' keywords -- programmers aren't that good at spelling, and cannot break backwards compatibility once a language has been rolled out. But I have yet to see a language with a "prnit" or "inputt" command.  ;)
Would color vs. colour suffice?

Kidding aside, typos are different from spelling errors, and spelling errors are in fact quite common in various APIs.  Typos are usually caught by other developers (or the developers themselves after a while), but spelling errors do creep in; mostly in library interfaces, since the core languages tend to get reviewed by people who can actually spell before they become too widespread to fix.  The first example that comes to mind that I've seen in a library is parallell instead of parallel.

A real example of a syntax mistake is print in Python 2.  Although it is a function, it did not require parentheses around its argument.  This was corrected in Python 3.  (A counterexample is return, which is a statement and not a function, and therefore does not need parentheses around the argument(s).)

That might look like pedantic picking, but the difference does matter at the implementation level a lot in Python.  In C, it is actually very important: for example, sizeof(i++) does not increment the value of variable i, because sizeof is an operator that evaluates to the size of its argument without evaluating the argument for side effects (like increments, decrements, or memory accesses).  This, and similar issues with optional macros (assert() et cetera), often surprise new programmers, and cause hard to debug problems.

(They are not hard to debug because they're difficult to see, quite the contrary; they are hard to debug because the programmer's intent is not written anywhere, so to see that the intent and the implementation do not match, one has to divine the original programmer's intent.  That divination part is the hard part.)

So yeah, you do need to expect some errors/oddities in programming language syntaxes, and library interfaces.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7453
  • Country: pl
Re: Exponents
« Reply #51 on: April 10, 2019, 05:18:40 pm »
Well, we have HTTP Referer field. Not sure if it originally was a typo or a deliberate attempt at shaving one byte from each request :-DD
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7192
  • Country: fi
    • My home page and email address
Re: Exponents
« Reply #52 on: April 10, 2019, 11:20:54 pm »
I'd say "referer" was a spelling mistake.  (Consider e.g. referee.  I'd say it is an easy mistake, something I could make myself.)

As an example of the stranger choices devs have made, is the legendary Boolean implementation with tristate values: True, False, and FILE_NOT_FOUND.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Exponents
« Reply #53 on: April 10, 2019, 11:55:55 pm »
Quote

GNU Fortran
Program Exponents
    print *, -3**4
end program Exponents

-81


You are soooo old!  Oh dang!
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12413
  • Country: au
Re: Exponents
« Reply #54 on: April 11, 2019, 12:59:18 am »
Here is the core of the problem!:
It would be better if there was a separate operators for negation and subtraction instead.

These are two different operations that give the same result in many situations - but even so, I still stand by my earlier statement:
If there IS an issue with the expression, then that lies with the person who prepared it.  THAT is, actually, a much more important step than resolving it.  If it is not written correctly, then you will not - and can not - get a correct answer.

Mathematical expressions are usually a representation of some part of the universe in which we live.  As such, there will be only one correct way to write them (commutative laws aside) - so if there is any chance of ambiguity, the simple answer is to use parentheses.

If the person writing the expression does not do this, then they will be reliant on the expression being evaluated according to the rules they observed when drafting it.  As we have seen, this has risks - and mathematical expressions are a class of study where this sort of risk has no place.
« Last Edit: April 11, 2019, 01:02:38 am by Brumby »
 
The following users thanked this post: CatalinaWOW

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9963
  • Country: us
Re: Exponents
« Reply #55 on: April 11, 2019, 01:51:22 am »
You have a point there, but nevertheless it's pretty disappointing. By the same token, you could argue that one should expect some spelling errors in programming languages' keywords -- programmers aren't that good at spelling, and cannot break backwards compatibility once a language has been rolled out. But I have yet to see a language with a "prnit" or "inputt" command.  ;)

There was a FORTRAN compiler, way back when, that would accept DAMNITALL for the DIMENSION keyword.  9 characters and the D & M matched.  It may have been the IBM 1130, I don't recall.  Nor did I ever try to disprove it.  I had enough problems doing my own keypunch.

I just wanted the compiler to fix my missing parentheses at the end of FORMAT statements.
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3490
  • Country: us
Re: Exponents
« Reply #56 on: April 11, 2019, 02:17:30 am »
In general, because many programmers aren't that good at math and changing the precedence/associativity rules when your users have gotten used to them would be downright evil, one must assume that software environments do not always parse or compute expressions correctly.

You have a point there, but nevertheless it's pretty disappointing. By the same token, you could argue that one should expect some spelling errors in programming languages' keywords -- programmers aren't that good at spelling, and cannot break backwards compatibility once a language has been rolled out. But I have yet to see a language with a "prnit" or "inputt" command.  ;)

re: "In general, because many programmers aren't that good at math..."

What is ironic is that in the early days of computer science, many universities didn't yet have CS as a major and they rolled it into the math department.  So most programmers back then had math degree instead of CS degree.

Purdue Univ was the first in the USA to offer CS degree in 1962.  So you can bet in the 1960's, 90% of the programmers are "math" majors.

Herman Cain, a computer guy (pizza company CEO, one time presidential candidate, currently being nominated for the Federal Reserve) spoke of his PhD in "math" that he is a "mathematician" only because the U he attended didn't have CS yet.

This gives interesting meaning to the title BS in Math.
 

Offline 0culus

  • Super Contributor
  • ***
  • Posts: 3032
  • Country: us
  • Electronics, RF, and TEA Hobbyist
Re: Exponents
« Reply #57 on: April 11, 2019, 03:27:22 am »
Bullshit, More Shit, and Shit Piled Higher and Deeper!
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7192
  • Country: fi
    • My home page and email address
Re: Exponents
« Reply #58 on: April 11, 2019, 10:50:36 am »
If there IS an issue with the expression, then that lies with the person who prepared it.  THAT is, actually, a much more important step than resolving it.  If it is not written correctly, then you will not - and can not - get a correct answer.
With programming languages, libraries, applications and environments, the problem is that the rules are implemented, not just stated.  This means that when you input an expression, the environment may not parse it according to the stated or assumed rules.  My point is that because their implementors are human, the possibility of such errors always exists.

The simple solution, which we seem to agree on, is to use parentheses to ensure an unambiguous parsing and evaluation of the expression.
And, one could add, to verify the correctness of the environment via known expressions: 1+2×3 and so on.

To rephrase: while the mathematical identities and formulae are exact and unambiguous, we humans can express them in different ways.  We have different notations and so on.  Essentially, when a human writes a mathematical expression, the thing it describes is exact, but the expression uses formatting rules set by us fallible humans.  The problem is not with the underlying math or its exactness, it is only that those formatting rules do vary.

What is ironic is that in the early days of computer science, many universities didn't yet have CS as a major and they rolled it into the math department.  So most programmers back then had math degree instead of CS degree.
How many of the mathematicians you know can state the order of precedence of the basic arithmetic operators offhand?  Among those I know, not many; most would struggle a lot.  Or laugh, then Google it.

Bullshit, More Shit, and Shit Piled Higher and Deeper!
:-//
Maybe lay off the drugs for a while, eh?
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21226
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Exponents
« Reply #59 on: April 11, 2019, 12:16:18 pm »
If there IS an issue with the expression, then that lies with the person who prepared it.  THAT is, actually, a much more important step than resolving it.  If it is not written correctly, then you will not - and can not - get a correct answer.
With programming languages, libraries, applications and environments, the problem is that the rules are implemented, not just stated.  This means that when you input an expression, the environment may not parse it according to the stated or assumed rules.  My point is that because their implementors are human, the possibility of such errors always exists.

The simple solution, which we seem to agree on, is to use parentheses to ensure an unambiguous parsing and evaluation of the expression.
And, one could add, to verify the correctness of the environment via known expressions: 1+2×3 and so on.

To rephrase: while the mathematical identities and formulae are exact and unambiguous, we humans can express them in different ways.  We have different notations and so on.  Essentially, when a human writes a mathematical expression, the thing it describes is exact, but the expression uses formatting rules set by us fallible humans.  The problem is not with the underlying math or its exactness, it is only that those formatting rules do vary.

What is ironic is that in the early days of computer science, many universities didn't yet have CS as a major and they rolled it into the math department.  So most programmers back then had math degree instead of CS degree.
How many of the mathematicians you know can state the order of precedence of the basic arithmetic operators offhand?  Among those I know, not many; most would struggle a lot.  Or laugh, then Google it.

All of them, full stop.

The point is that there has to be some commonly understood and shared meaning, otherwise communication cannot happen. If a person chooses new meanings that are different to the standard meanings, then it is up to that person to state what they mean.

If they don't do that then there's nothing to prevent "I'm going to get a cup of coffee" meaning "You're going to drive the car" :)

Hence, in the original question, it is reasonable to ask where the parentheses are, and reasonable to answer "no parentheses, normal laws of arithmetic", or "no parentheses, in Excel spreadsheets". It is to be deprecated that the answers are different.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 7375
  • Country: de
Re: Exponents
« Reply #60 on: April 11, 2019, 12:21:15 pm »
If they don't do that then there's nothing to prevent "I'm going to get a cup of coffee" meaning "You're going to drive the car" :)

But "I'm going to have a few beers now" does indeed mean "You're going to drive the car" :)
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1718
  • Country: gb
Re: Exponents
« Reply #61 on: April 11, 2019, 01:52:11 pm »
I'm still unsure why this thread has so many replies (I'm aware I'm adding to this!).  Precedence is indeed important and despite what nominal animal suggested, I'm pretty sure almost all "mathematicians" could state the order, perhaps with the acronyms BODMAS or PEDMAS.  Especially as it is so fundamental to even basic algebra. 

Whilst the average Joe who was taught this in basic mathematics has probably forgotten because most simply do not need to use this, I am willing to bet Engineers will be more likely to know this.

If the OP struggles with where to use parenthesis (I'm not suggesting he does, I don't know) then playing around with Excel can be handy, as that is quite strict in its use of them.  Even when they are correctly closed moving them about will give different answers, and breaking up an equation - so you can see the output of each part in its own cell - is a good way of seeing whats happening.  Algebra is just one of those things that tends to "click", and once basic rules are known/realized, can be a powerful tool.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7192
  • Country: fi
    • My home page and email address
Re: Exponents
« Reply #62 on: April 11, 2019, 02:09:23 pm »
The point is that there has to be some commonly understood and shared meaning, otherwise communication cannot happen. If a person chooses new meanings that are different to the standard meanings, then it is up to that person to state what they mean.
No, I mean that us "users" must verify we agree what the rules/meanings/precedences are, and not just assume they are some standard ones, because they do vary.

Just because the PEMDAS infix notation is the only one you have been taught, does not mean it is the only one used.  It is the only one you've ever used, perhaps... but the rest of us have used RPN and others, especially when using practical tools to solve practical problems.  (Conversion between infix and postfix notation, using the shunting yard algoritm, is a very common exercise in computer science.)

For example, if you show
$$ y = c_i x^i $$
to a mathematician, they probably think it is an odd way to specify a monomial whose degree depends on some constant named \$ i \$; but physicists know this is just shorthand, Einstein notation (as having the constant factor name depend on the degree of the monomial makes no sense!), equivalent to
$$ y = \sum_i c_i x^i $$

In quantum mechanics you have Dirac or bra-ket notation, \$ \left\lt\varphi\right\rvert \$ and \$ \left\lvert\theta\right\gt \$, that follow the rules of linear algebra, and actually represent matrices; but because of their properties, they are rarely if ever expanded to their actual matrix representations.  For example, the superposition of wave functions \$\varphi\$ and \$\theta\$ is \$ \left\lt\varphi\right\rvert\left.\theta\right\gt = \int \left\lt\varphi\right\rvert\left. x \right\gt \left\lt x \right \rvert \left . \theta \right \gt dx = \int \overline{\varphi(x)} \theta(x) dx\$, where \$ \overline{\varphi(x)} \$ is the complex conjugate of the wave function \$\varphi(x)\$, \$\left\lvert \varphi \right\gt\$ is the state (column) vector for the wave function \$\varphi\$, and \$\left\lt \theta \right\rvert\$ is the Hermitian conjugate of the state vector for the wave function \$\theta\$.
Here, you don't just need to know the notation, you need to know the domain-specific rules that apply to this notation, to save yourself a fuckton of extra work.

(Stuff like Gaussian error functions, elliptic integrals, and so on, being already implemented in many programming languages and math libraries is what typical programmers might not know, and instead open-code inferior/approximate versions of.  And that some languages/applications use a different order of arithmetic and unary/binary/boolean operators than you might expect.)

Notation rules are not universal, they do vary.  The more complex the application domain is, the more likely it is they use their own notation and rules to simplify it.

Hence, in the original question, it is reasonable to ask where the parentheses are, and reasonable to answer "no parentheses, normal laws of arithmetic", or "no parentheses, in Excel spreadsheets".
Fully agreed; and the core of what I am trying to say too.
« Last Edit: April 11, 2019, 02:16:56 pm by Nominal Animal »
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21226
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Exponents
« Reply #63 on: April 11, 2019, 02:20:59 pm »
I'm still unsure why this thread has so many replies (I'm aware I'm adding to this!).  Precedence is indeed important and despite what nominal animal suggested, I'm pretty sure almost all "mathematicians" could state the order, perhaps with the acronyms BODMAS or PEDMAS.  Especially as it is so fundamental to even basic algebra. 

Whilst the average Joe who was taught this in basic mathematics has probably forgotten because most simply do not need to use this, I am willing to bet Engineers will be more likely to know this.

Engineers ought to. I wouldn't bet on UK primary school teachers knowing though :(

Quote
If the OP struggles with where to use parenthesis (I'm not suggesting he does, I don't know) then playing around with Excel can be handy, as that is quite strict in its use of them. 

It may be strict, but it is wrong (except within its own self-contained world). Shades of "Through the Looking Glass":

Quote
Humpty Dumpty took the book, and looked at it carefully. ‘That seems to be done right —’ he began.

‘You’re holding it upside down!’ Alice interrupted.

‘To be sure I was!’ Humpty Dumpty said gaily, as she turned it round for him. ‘I thought it looked a little queer. As I was saying, that seems to be done right — though I haven’t time to look it over thoroughly just now — and that shows that there are three hundred and sixty-four days when you might get un-birthday presents —’

‘Certainly,’ said Alice.

‘And only one for birthday presents, you know. There’s glory for you!’

‘I don’t know what you mean by “glory,”’ Alice said.

Humpty Dumpty smiled contemptuously. ‘Of course you don’t — till I tell you. I meant “there’s a nice knock-down argument for you!”’

‘But “glory” doesn’t mean “a nice knock-down argument,”’ Alice objected.

‘When I use a word,’ Humpty Dumpty said in rather a scornful tone, ‘it means just what I choose it to mean — neither more nor less.’

‘The question is,’ said Alice, ‘whether you can make words mean so many different things.’

‘The question is,’ said Humpty Dumpty, ‘which is to be master — that’s all.’
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: newbrain

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21226
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Exponents
« Reply #64 on: April 11, 2019, 02:28:58 pm »
The point is that there has to be some commonly understood and shared meaning, otherwise communication cannot happen. If a person chooses new meanings that are different to the standard meanings, then it is up to that person to state what they mean.
No, I mean that us "users" must verify we agree what the rules/meanings/precedences are, and not just assume they are some standard ones, because they do vary.

See the "Through the Looking Glass" quote in my previous message.

Quote
Notation rules are not universal, they do vary.  The more complex the application domain is, the more likely it is they use their own notation and rules to simplify it.

Hence, in the original question, it is reasonable to ask where the parentheses are, and reasonable to answer "no parentheses, normal laws of arithmetic", or "no parentheses, in Excel spreadsheets".
Fully agreed; and the core of what I am trying to say too.

Ah, but which is it more likely that people should know:
  • something that has been invariant for hundreds of years across all civilisations, and they were taught in school
  • one specific computer program created a few decades ago, that was then copied by other programs
The latter makes me wince, and I think it is unreasonable.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 7375
  • Country: de
Re: Exponents
« Reply #65 on: April 11, 2019, 02:57:58 pm »
I'm still unsure why this thread has so many replies
...
If the OP struggles with where to use parenthesis (I'm not suggesting he does, I don't know) then playing around with Excel can be handy, as that is quite strict in its use of them.

You are nicely illustrating why there are so many replies here. Besides people being chatty (myself included), some posters don't read the previous posts carefully and then make comments which add to the confusion.  :P

Excel was one of the very few examples highlighted in this thread which got operator precedence wrong, compared to mathematical convention. So playing around with Excel is not the recommended way to learn about mathematical notation conventions.
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1718
  • Country: gb
Re: Exponents
« Reply #66 on: April 11, 2019, 02:59:11 pm »
I'm still unsure why this thread has so many replies (I'm aware I'm adding to this!).  Precedence is indeed important and despite what nominal animal suggested, I'm pretty sure almost all "mathematicians" could state the order, perhaps with the acronyms BODMAS or PEDMAS.  Especially as it is so fundamental to even basic algebra. 

Whilst the average Joe who was taught this in basic mathematics has probably forgotten because most simply do not need to use this, I am willing to bet Engineers will be more likely to know this.

Engineers ought to. I wouldn't bet on UK primary school teachers knowing though :(


Why would they need to know?  Whilst I vaguely remember learning some algebra in primary school, I'm not sure it was required.  Why pick on primary school teachers?  They have an ever growing work load and constant changes to curriculum from a government who wants "all UK children to be above average"  :-DD (Direct quote from Michael Gove there).

I have noticed a lot of threads that deal with education or the basics of engineering/mathematics have this air of "in my day things were better" from the older generation.  Of course people are going to think that, because otherwise it implies that their education - and by extension, themselves - is/was substandard or outdated.  It doesn't mean that we are in fact "going backwards", it just appears that way as we get older, because of inevitable changes to education.


If the OP struggles with where to use parenthesis (I'm not suggesting he does, I don't know) then playing around with Excel can be handy, as that is quite strict in its use of them. 

It may be strict, but it is wrong (except within its own self-contained world). Shades of "Through the Looking Glass":


As for Excel being wrong, I guess this is what the bulk of the replies are about. What one considers to be right.  According to my Excel, -3^4 = 81.  Which I believe to be correct. And -(3^4) = -81. Also correct. So I'm not sure what your point is? 
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21226
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Exponents
« Reply #67 on: April 11, 2019, 03:04:13 pm »
I'm still unsure why this thread has so many replies (I'm aware I'm adding to this!).  Precedence is indeed important and despite what nominal animal suggested, I'm pretty sure almost all "mathematicians" could state the order, perhaps with the acronyms BODMAS or PEDMAS.  Especially as it is so fundamental to even basic algebra. 

Whilst the average Joe who was taught this in basic mathematics has probably forgotten because most simply do not need to use this, I am willing to bet Engineers will be more likely to know this.

Engineers ought to. I wouldn't bet on UK primary school teachers knowing though :(


Why would they need to know?  Whilst I vaguely remember learning some algebra in primary school, I'm not sure it was required.  Why pick on primary school teachers?  They have an ever growing work load and constant changes to curriculum from a government who wants "all UK children to be above average"  :-DD (Direct quote from Michael Gove there).

I have noticed a lot of threads that deal with education or the basics of engineering/mathematics have this air of "in my day things were better" from the older generation.  Of course people are going to think that, because otherwise it implies that their education - and by extension, themselves - is/was substandard or outdated.  It doesn't mean that we are in fact "going backwards", it just appears that way as we get older, because of inevitable changes to education.


If the OP struggles with where to use parenthesis (I'm not suggesting he does, I don't know) then playing around with Excel can be handy, as that is quite strict in its use of them. 

It may be strict, but it is wrong (except within its own self-contained world). Shades of "Through the Looking Glass":


As for Excel being wrong, I guess this is what the bulk of the replies are about. What one considers to be right.  According to my Excel, -3^4 = 81.  Which I believe to be correct. And -(3^4) = -81. Also correct. So I'm not sure what your point is?

Using similar reasoning, I consider 6*9=42 to be correct, because it is correct.

But that's not very helpful, and could be considered peverse.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 7375
  • Country: de
Re: Exponents
« Reply #68 on: April 11, 2019, 03:05:45 pm »
As for Excel being wrong, I guess this is what the bulk of the replies are about. What one considers to be right.  According to my Excel, -3^4 = 81.  Which I believe to be correct. And -(3^4) = -81. Also correct. So I'm not sure what your point is?

Grmpf. Just read the posts above.
Or read this, quoted a couple of times in this thread: https://en.wikipedia.org/wiki/Order_of_operations#Unary_minus_sign

Excel is one of the few programs which implements unary minus the wrong way, i.e. different from mathematical notation. The correct math is -34 = - (34) = -81.
« Last Edit: April 11, 2019, 03:08:14 pm by ebastler »
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1718
  • Country: gb
Re: Exponents
« Reply #69 on: April 11, 2019, 03:08:41 pm »
I'm still unsure why this thread has so many replies
...
If the OP struggles with where to use parenthesis (I'm not suggesting he does, I don't know) then playing around with Excel can be handy, as that is quite strict in its use of them.

You are nicely illustrating why there are so many replies here. Besides people being chatty (myself included), some posters don't read the previous posts carefully and then make comments which add to the confusion.  :P

Excel was one of the very few examples highlighted in this thread which got operator precedence wrong, compared to mathematical convention. So playing around with Excel is not the recommended way to learn about mathematical notation conventions.

Ok, I think I see your point.  The idea that the sign is in fact a multiplication by -1, so -34 should be -1*34, and because of precedence, the exponent should be calculated before multiplication, giving -1*81 = -81?  If we add parentheses around that assumption: (-1 * 3)4 then the answer is of course 81 - parentheses first, then exponent.

I still maintain that without parentheses, there is ambiguity. So the OP's original question has the answer: it depends.  As for excel being "wrong", anyone who doesn't use parentheses correctly is relying on whatever rules their software uses which as can be seen from this thread, varies.  As to which software is "right", again this depends on what rules it uses, and will just go around in circles of people saying "but but but its wrong!".

The take home message is - correct/strict use of parentheses isn't optional.  Complaining that software doesn't do things how you expect when you don't use them isn't the fault of the software, it is the fault of the user.
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 7375
  • Country: de
Re: Exponents
« Reply #70 on: April 11, 2019, 03:23:14 pm »
As for excel being "wrong", anyone who doesn't use parentheses correctly is relying on whatever rules their software uses which as can be seen from this thread, varies.  As to which software is "right", again this depends on what rules it uses, and will just go around in circles of people saying "but but but its wrong!".

The take home message is - correct/strict use of parentheses isn't optional.  Complaining that software doesn't do things how you expect when you don't use them isn't the fault of the software, it is the fault of the user.

Sorry, that's still a distorted view in my opinion.

Mathematical notation came first, with a headstart of probably a couple hundred years over Excel. Then Excel came along, which clearly plays in the field of mathematics. (At least they did choose to use the conventional numerals... ::)) And they "chose" to implement unary minus with a different precedence, out of ignorance. How is that not "wrong"?

As a result, we are now forced to use redundant parantheses to work around the Excel-induced errors and confusion.  Not "correct" or "strict" parentheses, mind you.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21226
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Exponents
« Reply #71 on: April 11, 2019, 03:23:58 pm »
As for excel being "wrong", anyone who doesn't use parentheses correctly is relying on whatever rules their software uses which as can be seen from this thread, varies.

Do you seriously believe that software is a definition of anything?

Unless you are inconsistent, you have to agree that this isn't unreasonable:
   7 - 7 = 0
   and
   7 - 7 - 7 = 7
   and
   7 - 7 - 7 - 7 = 0
   and
   7 - 7  - 7 - 7 - 7 = 7
since that's what happens in one computer language.

There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: newbrain

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7192
  • Country: fi
    • My home page and email address
Re: Exponents
« Reply #72 on: April 11, 2019, 03:26:24 pm »
something that has been invariant for hundreds of years across all civilisations, and they were taught in school
No such "invariant for hundreds of years across all civilisations" math notation exist.  Whoever told you that, lied.  See any history of mathematics book.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7453
  • Country: pl
Re: Exponents
« Reply #73 on: April 11, 2019, 03:42:58 pm »
I have noticed a lot of threads that deal with education or the basics of engineering/mathematics have this air of "in my day things were better" from the older generation.  Of course people are going to think that, because otherwise it implies that their education - and by extension, themselves - is/was substandard or outdated.
I have noticed a lot of people trying to explain away simple and widely acknowledged facts by insinuating that they exist only in imaginations of fragile egos.

I have heard old date university teachers talking about the first year students coming in "these days". I have seen highschool textbooks from 20 years prior and compared them to mine. I know what to think without any of your whataboutism, thank you very much. Don't even want to go on a rant about your assumption that "not better" somehow implies "worse or outdated". Particularly in maths and science.

I have also heard similar complaints from various Westerners so it's not just my country. Maybe yours is different, but frankly, there are obvious mechanisms driving education downwards and they are ubiquitous in all of the first world, so I doubt it. Namely: more (read: dumber) people are pushed into education for longer years so standards must be adjusted accordingly, every ten years somebody invents a new and better way of teaching the same stuff, everything is being bureaucratized to the point where teachers have to teach themselves to follow the latest rules rather than teach their students, education is mostly/largely public and underfunded (is it Finland that's an exception? how many such countries?) and so on.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9963
  • Country: us
Re: Exponents
« Reply #74 on: April 11, 2019, 03:49:56 pm »

   7 - 7 - 7 = 7
   and
   7 - 7 - 7 - 7 = 0

We had APL on the IBM 1130 back in '70 but I never got around to playing with it.  I didn't realize it evaluated from right to left.

Interesting!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf