Author Topic: A warning to engineers about calculators  (Read 8561 times)

0 Members and 1 Guest are viewing this topic.

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12570
  • Country: us
Re: A warning to engineers about calculators
« Reply #25 on: December 14, 2024, 08:42:38 pm »
I've said I've only been using this a day and found significant problems with it in other areas so it's not just this one thing. They've implemented hundreds of functions and it wouldn't surprise me at all if there are other serious issues.

In this thread you have not demonstrated anything wrong with this calculator app. You have complained about a lot, but you have not demonstrated it.

None of your screenshots show the actual evidence of anything being wrong. And whatever you have shown with percentages is similar to every other calculator out there. We've compared with Google, iOS, Android, HP, and they all work in the same (logical, expected) way. I have tested with a Jot calculator from the dollar store, and I could test with Sharp, Casio and others. All work the same way.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15948
  • Country: fr
Re: A warning to engineers about calculators
« Reply #26 on: December 14, 2024, 08:50:50 pm »
The % thing is a matter of convention and the OP may have been used to a particular calculator that was implementing it in a certain way. It's obviously not a matter of how the percentage is defined, but how a given calculator implements its "%" key in terms of syntax.

The precision thing would be a more serious problem.

I wouldn't recommend using any of those mobile apps for anything critiical anyway. For occasional quick calcs when you are on the go, that's fine.
 

Offline Russ_ATopic starter

  • Contributor
  • Posts: 20
  • Country: ca
Re: A warning to engineers about calculators
« Reply #27 on: December 14, 2024, 08:53:17 pm »
Those aren't calculators where you enter a long expression and then hit enter. They calculate each function one at a time, using the previous answer as an input to the new function. They essentially have a wildly different rule set for order of operations and I wouldn't expect the % function to behave the same as a proper modern scientific calculator. What this app developer has done is try to implement this full expression entry method when they don't understand it. They don't realize the distinction and they've tried to implement everything under the sun without any testing. They obviously don't test their functions because ran# is completely broken. They said they knew about it when I contacted them but that they didn't know how to fix it. My warning in general is just not to trust these things. It can look super polished on the surface but the programming can be a disaster.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12570
  • Country: us
Re: A warning to engineers about calculators
« Reply #28 on: December 14, 2024, 08:55:24 pm »
The precision thing would be a more serious problem.

But once again, there is a claim, but no demonstration of this in any screenshots. It may be true, but if so, why not illustrate the problem?

If you choose fixed display it truncates the number and loses the precision you had.

Except, in the screenshot provided, it does not truncate, it rounds, as would be expected. And there is no demonstration of the digits being lost. Why not?
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 7393
  • Country: de
Re: A warning to engineers about calculators
« Reply #29 on: December 14, 2024, 08:59:56 pm »
Those aren't calculators where you enter a long expression and then hit enter. They calculate each function one at a time, using the previous answer as an input to the new function. They essentially have a wildly different rule set for order of operations and I wouldn't expect the % function to behave the same as a proper modern scientific calculator. What this app developer has done is try to implement this full expression entry method when they don't understand it. They don't realize the distinction and they've tried to implement everything under the sun without any testing. They obviously don't test their functions because ran# is completely broken. They said they knew about it when I contacted them but that they didn't know how to fix it. My warning in general is just not to trust these things. It can look super polished on the surface but the programming can be a disaster.

Could you give us a few specific examples of calculator models which do behave the way you expect them to behave?
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21461
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: A warning to engineers about calculators
« Reply #30 on: December 14, 2024, 09:03:27 pm »
The % thing is a matter of convention and the OP may have been used to a particular calculator that was implementing it in a certain way. It's obviously not a matter of how the percentage is defined, but how a given calculator implements its "%" key in terms of syntax.

That calculator is relatively normal, at least with on the range of 1+2*3=9 or 1+2*3=7.

If you want wierd, consider the Sumlock Anita 811, which is sometimes RPN and sometimes algebraic. Ish. https://www.eevblog.com/forum/buysellwanted/wtb-stand-for-early-fuller-calculator/msg5747661/#msg5747661
And that didn't mention the full strangeness.
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: tooki

Offline showman

  • Contributor
  • Posts: 29
  • Country: 00
Re: A warning to engineers about calculators
« Reply #31 on: December 14, 2024, 09:21:08 pm »
The precision thing would be a more serious problem.

But once again, there is a claim, but no demonstration of this in any screenshots. It may be true, but if so, why not illustrate the problem?

Yeah, I tried that calculator and don't see any loss. Set the display precision to 3 decimal digits and did sin(45), got 0.707 and after that arcsin(Ans) gives 45.000 instead of 44.991. No problems with sqrt(2)  sqrt(2)*Ans and 1/9  Ans*9 either.
« Last Edit: December 14, 2024, 09:22:55 pm by showman »
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5645
  • Country: gw
Re: A warning to engineers about calculators
« Reply #32 on: December 14, 2024, 09:58:21 pm »
.. I explained that % should always be the same as /100 but they don't believe me..

Afaik, all calculators I've ever seen understand the entering "9 - 10 %" as "please, subtract 10 percent from the 9".. This works that way since ever, imho.
Creating something like "10%" producing "10/100" has absolutely none sense in any industry, imho.
Readers discretion is advised..
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 5186
  • Country: au
    • send complaints here
Re: A warning to engineers about calculators
« Reply #33 on: December 14, 2024, 10:03:27 pm »
Could you give us a few specific examples of calculator models which do behave the way you expect them to behave?
TI CAS (nspire etc) evaluates the percent sign as /100 which produces:
9 - 10% = 89/10
5 + 5 - 10% = 99/10

anything which evaluates that second expression to something else has broken additions Commutativity and Associativity, so by strict mathematical ordering the "correct" results for finance or smooth brains are nonsense and lack a clear ordering of operations.

Creating something like "10%" producing "10/100" has absolutely none sense in any industry, imho.
Industry? depends on the specific industry. But what is the expected answer for 5 + 5 - 10% ? why should that be different to 5 - 10% + 5, or -10% + 5 + 5 ?
 

Online nfmax

  • Super Contributor
  • ***
  • Posts: 1627
  • Country: gb
Re: A warning to engineers about calculators
« Reply #34 on: December 14, 2024, 10:14:41 pm »
But % is a binary operator! It’s two arguments are the percentage itself, and the number you want to take the percentage of. It’s obvious in RPN
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5645
  • Country: gw
Re: A warning to engineers about calculators
« Reply #35 on: December 14, 2024, 10:18:55 pm »
This thread reminds me on an anecdotal situation - as a rookie in biz my boss called me saying "I told you to make 35% project margin thus you have to multiply your costs by 1.54"..
Readers discretion is advised..
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21461
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: A warning to engineers about calculators
« Reply #36 on: December 14, 2024, 10:23:03 pm »
But % is a binary operator! It’s two arguments are the percentage itself, and the number you want to take the percentage of. It’s obvious in RPN

But then everything is obvious (and simple) in RPN.

Too many people seriously believe 1+2*3 is 9. But then some people believe -6 is larger than -4.
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 Someone

  • Super Contributor
  • ***
  • Posts: 5186
  • Country: au
    • send complaints here
Re: A warning to engineers about calculators
« Reply #37 on: December 14, 2024, 10:28:46 pm »
But % is a binary operator! It’s two arguments are the percentage itself, and the number you want to take the percentage of. It’s obvious in RPN
Not true in the mathematical sense:
https://en.wikipedia.org/wiki/Percentage
Just because there are calculators which use certain sequences to represent operations does not mean that maps 1:1 with written equations, RPN is pretty much the example of that. Percent is more like an SI prefix, all it says is this number next to it is in units of 1/100ths
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 5186
  • Country: au
    • send complaints here
Re: A warning to engineers about calculators
« Reply #38 on: December 14, 2024, 10:32:42 pm »
But % is a binary operator! It’s two arguments are the percentage itself, and the number you want to take the percentage of. It’s obvious in RPN
But then everything is obvious (and simple) in RPN.
More like RPN is unambiguous in operation order, a good thing. But it is not directly equivalent to:
9 - 10%
RPN would represent that as either:
9 ENTER 10% -
which is something else entirely, or as strictly mathematically written:
1 enter 10% 9 - +/-

(probably some better way to do that in RPN but I'm less familiar)
« Last Edit: December 14, 2024, 10:37:10 pm by Someone »
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21461
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: A warning to engineers about calculators
« Reply #39 on: December 14, 2024, 10:35:56 pm »
My Anita 811 calculator has a "%=" key.

What is "25% of 125" is calculated "C 125 * 25 %=" i.e. 31.25.
"If 21 is 25%, what is 100%" is calculated "C 21 / 25 %=" i.e. 84.
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
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21461
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: A warning to engineers about calculators
« Reply #40 on: December 14, 2024, 10:40:14 pm »
But % is a binary operator! It’s two arguments are the percentage itself, and the number you want to take the percentage of. It’s obvious in RPN
But then everything is obvious (and simple) in RPN.
More like RPN is unambiguous in operation order, a good thing. But it is not directly equivalent to:
9 - 10%
RPN would make that:
9 ENTER 10% -
which is something else entirely.

Not quite.

RPN associates operands and operator in a simple and predictable way that extends to complex calculations.

Not entering keystrokes in the same order is unimportant and unsurprising. "If you want to go there , I wouldn't start from here"
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
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5645
  • Country: gw
Re: A warning to engineers about calculators
« Reply #41 on: December 14, 2024, 10:42:03 pm »
..Percent is more like an SI prefix, all it says is this number next to it is in units of 1/100ths

Hmm, I doubt so. As I wrote above it would have no sense in any industry..

Percentage on the calculator button pressed after a number P (like P %) says calculator to calculate P percent of the number A which you entered before the P..

Like "A + P%" means A + A/100*P..

For example entering "154 - 35 %" will be evaluated as 154 - 154/100*35 = 154 - 54 = 100

« Last Edit: December 14, 2024, 10:47:07 pm by iMo »
Readers discretion is advised..
 

Online nfmax

  • Super Contributor
  • ***
  • Posts: 1627
  • Country: gb
Re: A warning to engineers about calculators
« Reply #42 on: December 14, 2024, 10:42:55 pm »
But % is a binary operator! It’s two arguments are the percentage itself, and the number you want to take the percentage of. It’s obvious in RPN
But then everything is obvious (and simple) in RPN.
More like RPN is unambiguous in operation order, a good thing. But it is not directly equivalent to:
9 - 10%
RPN would represent that as either:
9 ENTER 10% -
which is something else entirely, or as strictly mathematically written:
1 enter 10% 9 - +/-

(probably some better way to do that in RPN but I'm less familiar)
It looks like the TI is treating % as a (postfix) unary operator, that divides its argument by 100. Perfectly reasonable, but not the same thing
 
The following users thanked this post: Someone

Offline Someone

  • Super Contributor
  • ***
  • Posts: 5186
  • Country: au
    • send complaints here
Re: A warning to engineers about calculators
« Reply #43 on: December 14, 2024, 10:47:20 pm »
But % is a binary operator! It’s two arguments are the percentage itself, and the number you want to take the percentage of. It’s obvious in RPN
But then everything is obvious (and simple) in RPN.
More like RPN is unambiguous in operation order, a good thing. But it is not directly equivalent to:
9 - 10%
RPN would make that:
9 ENTER 10% -
which is something else entirely.
Not quite.

RPN associates operands and operator in a simple and predictable way that extends to complex calculations.

Not entering keystrokes in the same order is unimportant and unsurprising. "If you want to go there , I wouldn't start from here"
You start with the assumption that 9 - 10% as written in clear text means 9 subtracting 10% of 9. Which I challenge anyone to find the strict mathematical definition of. While that might be slang/shorthand or accepted use in some fields, it does not make the numerical interpretation 9 minus 10 hundredths incorrect.

The RPN method to calculate relied on the user translating that equation as written and where the error arises at (regardless of calculation method). Only if the equation was written in RPN to begin with would it be unambiguous.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21461
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: A warning to engineers about calculators
« Reply #44 on: December 14, 2024, 10:57:10 pm »
But % is a binary operator! It’s two arguments are the percentage itself, and the number you want to take the percentage of. It’s obvious in RPN
But then everything is obvious (and simple) in RPN.
More like RPN is unambiguous in operation order, a good thing. But it is not directly equivalent to:
9 - 10%
RPN would make that:
9 ENTER 10% -
which is something else entirely.
Not quite.

RPN associates operands and operator in a simple and predictable way that extends to complex calculations.

Not entering keystrokes in the same order is unimportant and unsurprising. "If you want to go there , I wouldn't start from here"
You start with the assumption that 9 - 10% as written in clear text means 9 subtracting 10% of 9. Which I challenge anyone to find the strict mathematical definition of. While that might be slang/shorthand or accepted use in some fields, it does not make the numerical interpretation 9 minus 10 hundredths incorrect.

The RPN method to calculate relied on the user translating that equation as written and where the error arises at (regardless of calculation method). Only if the equation was written in RPN to begin with would it be unambiguous.

I don't assume anything.

Writing it in RPN makes it unambiguous.
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 Someone

  • Super Contributor
  • ***
  • Posts: 5186
  • Country: au
    • send complaints here
Re: A warning to engineers about calculators
« Reply #45 on: December 14, 2024, 10:58:33 pm »
But % is a binary operator! It’s two arguments are the percentage itself, and the number you want to take the percentage of. It’s obvious in RPN
But then everything is obvious (and simple) in RPN.
More like RPN is unambiguous in operation order, a good thing. But it is not directly equivalent to:
9 - 10%
RPN would represent that as either:
9 ENTER 10% -
which is something else entirely, or as strictly mathematically written:
1 enter 10% 9 - +/-

(probably some better way to do that in RPN but I'm less familiar)
It looks like the TI is treating % as a (postfix) unary operator, that divides its argument by 100. Perfectly reasonable, but not the same thing
Symbolic math calculator using strict mathematical rules? who'd have thought!

"the same thing" is the point here neither calculator is "wrong" but the user has entered different intents from their reading of the question, it is about the interpretation of the equation as written:
9 - 10%
Using strict/formal/actual mathematical notation that has only one interpretation, 9 minus 10 hundredths.

But % is a binary operator! It’s two arguments are the percentage itself, and the number you want to take the percentage of.
Over to you for the references of where that is defined....
..Percent is more like an SI prefix, all it says is this number next to it is in units of 1/100ths
Hmm, I doubt so. As I wrote above it would have no sense in any industry..

Percentage on the calculator button pressed after a number P (like P %) says calculator to calculate P percent of the number A which you entered before the P..

Like "A + P%" means A + A/100*P..

For example entering "154 - 35 %" will be evaluated as 154 - 154/100*35 = 154 - 54 = 100
Like I said, over to you to add some references for where % is defined in the language of mathematics as something other than a unary operator, and what rules it obeys in terms of order of operations and associativity.
https://en.wikipedia.org/wiki/Associative_property

Yes, there are calculators which use % as a function to reduce effort/buttons/compelxity. But that does not make the written example of 9 - 10% change its language. You would need to define it as the sequence on a specific calculator being:
9 enter 10 -+ %
which is something different to
9 - 10%

9 - 10% can be entered on some calculators, directly as text. If that returns something other than 8.9 (or the 89/10 fractional result) then it is a failure of that calculator to follow standard mathematical (not slang) language.
 

Offline showman

  • Contributor
  • Posts: 29
  • Country: 00
Re: A warning to engineers about calculators
« Reply #46 on: December 14, 2024, 10:58:55 pm »
RPN or no RPN is irrelevant, because it is still implementation specific
on HP 42S the stack is not popped after "%", it is [9 0.9] after "9 10%" and "-" results in 8.1
on HP 48G the stack is popped, so it is [0.9] after "9 10%" and "-" results in Error: Too few arguments
 
The following users thanked this post: Someone, ebastler

Offline Someone

  • Super Contributor
  • ***
  • Posts: 5186
  • Country: au
    • send complaints here
Re: A warning to engineers about calculators
« Reply #47 on: December 14, 2024, 11:10:04 pm »
But % is a binary operator! It’s two arguments are the percentage itself, and the number you want to take the percentage of. It’s obvious in RPN
But then everything is obvious (and simple) in RPN.
More like RPN is unambiguous in operation order, a good thing. But it is not directly equivalent to:
9 - 10%
RPN would make that:
9 ENTER 10% -
which is something else entirely.
Not quite.

RPN associates operands and operator in a simple and predictable way that extends to complex calculations.

Not entering keystrokes in the same order is unimportant and unsurprising. "If you want to go there , I wouldn't start from here"
You start with the assumption that 9 - 10% as written in clear text means 9 subtracting 10% of 9. Which I challenge anyone to find the strict mathematical definition of. While that might be slang/shorthand or accepted use in some fields, it does not make the numerical interpretation 9 minus 10 hundredths incorrect.

The RPN method to calculate relied on the user translating that equation as written and where the error arises at (regardless of calculation method). Only if the equation was written in RPN to begin with would it be unambiguous.
I don't assume anything.

Writing it in RPN makes it unambiguous.
9 - 10% is already unambiguous if you use the language of mathematics, just like your 1+2*3 example. Suggesting all equations are written down in RPN is plain silly.

Your original claim is still incorrect:
But % is a binary operator! It’s two arguments are the percentage itself, and the number you want to take the percentage of. It’s obvious in RPN
But then everything is obvious (and simple) in RPN.
Because clearly people are having trouble parsing either system. Changing from one language to another doesnt solve the underlying issue of mixing in slang terms and trying to accurately translate. And now we have user pointing out that RPN can have differing implementations (just as other calculator entry methods don't always agree on the details):
RPN or no RPN is irrelevant, because it is still implementation specific
on HP 42S the stack is not popped after "%", it is [9 0.9] after "9 10%" and "-" results in 8.1
on HP 48G the stack is popped, so it is [0.9] after "9 10%" and "-" results in Error: Too few arguments
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12570
  • Country: us
Re: A warning to engineers about calculators
« Reply #48 on: December 15, 2024, 01:49:38 am »
First of all, calculators do not do mathematics, they do calculations. Calculators are designed to help you solve arithmetic problems in an efficient way.

So trying to argue about the percent symbol from a mathematical point of view as being a unit of measure, as in parts per hundred, is to miss the point entirely. It is accurate, but is it useful?

When doing practical calculations, % as an operator represents a ratio between two numbers. If I want to calculate 8.5% sales tax on goods priced at $45, I want so that sales tax = 8.5% of $45. And if I want the total price with tax added on, it is helpful to calculate $45 + 8.5% = $48.83, and do this efficiently with a minimum of keystrokes. This was accomplished readily by every calculator made since the 1980's.

How is one going to do the "add sales tax" calculation efficiently on a device like the above-mentioned TI Nspire? I know, you will do something like (1 + 8.5%) * 45. But what the heck? I'm not going to waste my time doing that. I will just do 1.085 * 45 and be done with it.

On the other hand, it doesn't matter much, because the Nspire is the wrong tool for the job. You are not going to carry an Nspire in your pocket to work out tax while shopping.
 
The following users thanked this post: Someone

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5621
  • Country: us
Re: A warning to engineers about calculators
« Reply #49 on: December 15, 2024, 03:34:22 am »
Part of the confusion here is the dual use of the % symbol as both a unit signifier and an operator.  A conversion from a percent display to a real number display involves the divide by 100 mentioned by the OP.  But as an operator the result comes out as done by this and other calculators.  On this subject the OP should just admit his error and move on. 

Few random numbers generators in calculators and even programs like Excel generate really good random numbers, but the report of the OP sound particularly bad.  But demonstration is required which requires tediously writing down or exporting all of the results and analyzing them.  It would only take a few dozen to see if the performance is as bad as reported.  Many thousands to see if it is better than Excel. 

The calculation precision is easy to test.  Set precision to 8 for example and enter a number 1.123456789 for example.  The set precision to 1 and the multiply your number by 1.  The set precision back to 8 and examine the result.

Until something like this is reported I suspect operator error.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf