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

0 Members and 1 Guest are viewing this topic.

Offline Halcyon

  • Global Moderator
  • *****
  • Posts: 6167
  • Country: au
Re: A warning to engineers about calculators
« Reply #50 on: December 15, 2024, 05:09:47 am »
The Apple MacOS calculator also returns 8.1 for 9-10%.
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 5186
  • Country: au
    • send complaints here
Re: A warning to engineers about calculators
« Reply #51 on: December 15, 2024, 05:27:15 am »
The Apple MacOS calculator also returns 8.1 for 9-10%.
Sure does, and then disagrees with the browser based calculator from Google on what the order of operations should be (while they both get 1+2x3=7). So there is no consistent agreement on what 5+5-10% actually means, and how the % sign should be interpreted in a written equation. Equally there is no well accepted definition of what the simpler 9-10% actually means without other context. The major error is calculators trying to smash together well defined mathematical operators with their (ill/poorly/non defined) percent function and writing them together as a single line. All this goes away if people accept that adjusting by percentages is wordy thing and has no agree/formal language in mathematical equations.

10% less than the sum of 5 and 5

parseable and fairly unambiguous

This is the way people who do maths as their profession see it:
https://www.themathdoctors.org/order-of-operations-neglected-details/
take % as a unary operator as discussed above.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12570
  • Country: us
Re: A warning to engineers about calculators
« Reply #52 on: December 15, 2024, 06:15:19 am »
All this goes away if people accept that adjusting by percentages is wordy thing and has no agree/formal language in mathematical equations.

10% less than the sum of 5 and 5

parseable and fairly unambiguous

Indeed, and the corollary is that calculators are not puzzle solving devices, they are tools that can help you calculate things, provided you give precise instructions about what you want. If you write "5 + 5 − 10%", why should the machine have to read your mind and try to figure out what you mean by that? And why would you take a chance on the machine making the wrong guess? If you want the addition done first you can make that clear by writing instead "(5 + 5) − 10%" and then you will get what you need. And if you want it the other way, you can make sure of that too: "5 + (5 − 10%)".

The general advice and feedback from mathematicians is to be clear and unambiguous in what you write, and that it never hurts to include parentheses for the avoidance of doubt.
 
The following users thanked this post: Someone, Jacon

Offline Someone

  • Super Contributor
  • ***
  • Posts: 5186
  • Country: au
    • send complaints here
Re: A warning to engineers about calculators
« Reply #53 on: December 15, 2024, 07:33:20 am »
All this goes away if people accept that adjusting by percentages is wordy thing and has no agree/formal language in mathematical equations.

10% less than the sum of 5 and 5

parseable and fairly unambiguous

Indeed, and the corollary is that calculators are not puzzle solving devices, they are tools that can help you calculate things, provided you give precise instructions about what you want. If you write "5 + 5 − 10%", why should the machine have to read your mind and try to figure out what you mean by that? And why would you take a chance on the machine making the wrong guess? If you want the addition done first you can make that clear by writing instead "(5 + 5) − 10%" and then you will get what you need. And if you want it the other way, you can make sure of that too: "5 + (5 − 10%)".

The general advice and feedback from mathematicians is to be clear and unambiguous in what you write, and that it never hurts to include parentheses for the avoidance of doubt.
Agree, but I then take the hard stance of 9-10% = 8.9
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12570
  • Country: us
Re: A warning to engineers about calculators
« Reply #54 on: December 15, 2024, 08:10:40 am »
Agree, but I then take the hard stance of 9-10% = 8.9

I think it depends on what is programmed into a device and what the user guide says. For example, with buttons on a calculator, it might be very clear that the percent key applies to the number on the display, and the function depends on what key is pressed before it. In user guide terms, the following sequence of key presses would be documented to produce the result 8.1:

Code: [Select]
[9] [-] [1] [0] [%] [=]
When it comes to writing expressions in text in an edit window, it is more of a grey area, but it still depends on what the documentation says about how such expressions are treated. Unfortunately, I can't find any documentation for the Google calculator widget. So it's a matter of testing to find out.
« Last Edit: December 15, 2024, 08:12:50 am by IanB »
 
The following users thanked this post: Someone

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15948
  • Country: fr
Re: A warning to engineers about calculators
« Reply #55 on: December 15, 2024, 08:29:18 am »
Yeah.
" 9-10%" is going to be the new "8÷2(2+2)".  :-DD
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 15226
  • Country: de
Re: A warning to engineers about calculators
« Reply #56 on: December 15, 2024, 08:39:29 am »
For most calculators the % key is more of a joke, or for those who misses the decimal: it just divides the last number by 100. Form the math side this makes sense.

The problem is more that one should not write 8 minus 10 % as 8-10%.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12570
  • Country: us
Re: A warning to engineers about calculators
« Reply #57 on: December 15, 2024, 08:49:00 am »
With an RPN calculator like the HP-42S, the behavior is much more clear and logical. For example:

Code: [Select]
[CLST]
y: 0.0000
x: 0.0000

[9] [Enter]
y: 9.0000
x: 9.0000

[1] [0] [%]
y: 9.0000
x: 0.9000

[−]
y: 0.0000
x: 8.1000


You are not dealing with syntax or interpretation of expressions, you are dealing with operations that apply to the numbers on the display. What you see is what you get.
 

Online RFDx

  • Regular Contributor
  • *
  • Posts: 186
  • Country: de
Re: A warning to engineers about calculators
« Reply #58 on: December 15, 2024, 09:45:15 am »
On my Casio FX-991DE plus:

10% = 0.1

9 - 10% = 8.9

which is obvious and what I, the user, am expecting.

On Dreamcalc (PC calculator software), HiPER Calc Pro (Android calculator), Wolfram Alpha or most of the online calculators I tried:

10% = 0.1

9 - 10% = 8.1

This is just inconsistent if not silly.

The scientific online calculator on desmos.com needs to be explicitly told the number to calculate a percentage off:

9 - 10% of 9 = 8.1
9 - 10% of 1 = 8.9
 
The following users thanked this post: Someone, thm_w

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12570
  • Country: us
Re: A warning to engineers about calculators
« Reply #59 on: December 15, 2024, 10:11:04 am »
On my Casio FX-991DE plus:

10% = 0.1

9 - 10% = 8.9

which is obvious and what I, the user, am expecting.

On Dreamcalc (PC calculator software), HiPER Calc Pro (Android calculator), Wolfram Alpha or most of the online calculators I tried:

10% = 0.1

9 - 10% = 8.1

This is just inconsistent if not silly.

OK, but which one is useless, and which one is useful?
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21462
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: A warning to engineers about calculators
« Reply #60 on: December 15, 2024, 10:16:01 am »
All this goes away if people accept that adjusting by percentages is wordy thing and has no agree/formal language in mathematical equations.

10% less than the sum of 5 and 5

parseable and fairly unambiguous

Indeed, and the corollary is that calculators are not puzzle solving devices, they are tools that can help you calculate things, provided you give precise instructions about what you want. If you write "5 + 5 − 10%", why should the machine have to read your mind and try to figure out what you mean by that? And why would you take a chance on the machine making the wrong guess? If you want the addition done first you can make that clear by writing instead "(5 + 5) − 10%" and then you will get what you need. And if you want it the other way, you can make sure of that too: "5 + (5 − 10%)".

The general advice and feedback from mathematicians is to be clear and unambiguous in what you write, and that it never hurts to include parentheses for the avoidance of doubt.

The only thing I'll add is that people who throw numbers at a calculator and expect it to work out what they wanted, are also people that probably can't imagine there could be several interpretations of the keys they are entering.

Shame people aren't taught to mentally calculate roughly what they expect the answer to be, and only then to use the calculator to verify the details. That applies to every tool, e.g. DVM, scope, spectrum analyser etc.
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: mikerj

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21462
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: A warning to engineers about calculators
« Reply #61 on: December 15, 2024, 10:17:58 am »
On my Casio FX-991DE plus:

10% = 0.1

9 - 10% = 8.9

which is obvious and what I, the user, am expecting.

On Dreamcalc (PC calculator software), HiPER Calc Pro (Android calculator), Wolfram Alpha or most of the online calculators I tried:

10% = 0.1

9 - 10% = 8.1

This is just inconsistent if not silly.

OK, but which one is useless, and which one is useful?

The other one, of course :)
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 Tation

  • Regular Contributor
  • *
  • Posts: 108
  • Country: pt
Re: A warning to engineers about calculators
« Reply #62 on: December 15, 2024, 10:26:34 am »
I only use RPN & RPL calculators, so for me % is a binary operator. Using % as /100 seems acceptable, even maybe coherent, but I think it is also less useful and even strange to mean Joe (9 * 5 % to compute the 5% of 9, that's clumsy, my TI Datamath II did it in the 70s, we are now on the XXI century). In any case, not a matter to rise a case over, provided that different calculator manufacturers & programmers have not reached a consensus on this.

Hyper Calc performs calculations with the number P of digits you set (calls it precission, depends on portrait/landscape layout), and displays numbers with the number D of digits you set (must be D <= P). Five minutes using the app and one gets this. So, IMHO, this OP's rant was user error.
 

Online Tation

  • Regular Contributor
  • *
  • Posts: 108
  • Country: pt
Re: A warning to engineers about calculators
« Reply #63 on: December 15, 2024, 10:50:44 am »
IMHO, current calculators, that insist on you writing a complete algebraic expression to evaluate, like 5-1-2=, and then make great efforts to coerce any expression you write, no matter if it is ambiguous or not, into a number will do better rejecting ambiguous ones, forcing the user to write (5-1)-2= or 5-(1-2)=. Same can be said for programming languages.

Or, of course, use the one and only true notation: RPN  ;D
 
The following users thanked this post: TimFox

Online RAPo

  • Frequent Contributor
  • **
  • Posts: 905
  • Country: nl
Re: A warning to engineers about calculators
« Reply #64 on: December 15, 2024, 10:53:29 am »
So true!
Or, of course, use the one and only true notation: RPN  ;D
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2710
  • Country: fi
Re: A warning to engineers about calculators
« Reply #65 on: December 15, 2024, 11:17:28 am »
If I say 'ten minus ten percent' I mean that ten percent is off from ten.
So 5 + 5 - 10% should be 9.

I've never trusted calculators % calculations.
Usually it seems to be 5 + 5 = a; a - a * 0.1 = result.

Nine times five percent is 45%.
Advance-Aneng-Appa-AVO-Beckman-Danbridge-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-OR-X-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Topward-Triplett-Tritron-YFE
(plus lesser brands from the work shop of the world)
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1504
  • Country: pl
Re: A warning to engineers about calculators
« Reply #66 on: December 15, 2024, 12:37:41 pm »
If not talking about advanced scientific/engineering calculators, the precision was usually defined by the display width. Back to mechanic calculators. So is “strings” arithmetic: until recently virtually all simple calculators used BCD. That even transpired to early computers and is still available in the x86 instruction set.

For those reasons I’d consider this an unexpected behavior caused by a clash between two different features: the fixed width arithmetic and width dynamically changed depending on screen orientation. Something to be addressed, that’s certain. But not as a plain bug, but behavior that may surprise the user.

Of course using that representation in 21st century seems a weird choice for a tool that, I presume, aims to act as a scientific calculator. We have bignums and 64-bit floats, which suit those calculations much better. That I don’t deny. But it is not like the developers made some absurd, unheard of choice here.
People imagine AI as T1000. What we got so far is glorified T9.
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1504
  • Country: pl
Re: A warning to engineers about calculators
« Reply #67 on: December 15, 2024, 12:52:45 pm »
Perhaps it’s time for OP to simply admit the blunder? This thread becomes one of many, where a trivial issue receives pages of discussion, despite the subject got exhausted after a few posts.

On my Casio FX-991DE plus:
(…)
On Dreamcalc (PC calculator software), HiPER Calc Pro (Android calculator), Wolfram Alpha or most of the online calculators I tried:
(…)
This is just inconsistent if not silly.
Did the meaning of word “inconsistent” change recently? All calculators consistently give 8.1. Yet you call them inconsistent, instead of the single one, which acts different…

And this behavior is consistent with how the percent key on physical calculators usually worked,(1) and also how the percent sign is used in writing. “5 V ±10 %” is range [4.95, 5.05] (corrected) [4.5, 5.5] V, not [4.9, 5.1] V. If you thought different… maybe it’s time to check all your designs?


(1) And this is rooted in why the key is even present in calculators. In most it wouldn’t even be possible to use it in the way you suggest as “not silly.”
« Last Edit: December 15, 2024, 04:01:36 pm by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 5016
  • Country: gb
Re: A warning to engineers about calculators
« Reply #68 on: December 15, 2024, 02:30:59 pm »
This (online scientific calculator), gives 8.9

https://www.calculator.net/scientific-calculator.html

9 - 10% = 8.9

But this one, and many (almost all other, online versions that I have tried so far), gives:

https://web2.0calc.com/

9 - 10% = 8.1 (this one also somewhat shows the individual calculation steps):
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 5016
  • Country: gb
Re: A warning to engineers about calculators
« Reply #69 on: December 15, 2024, 02:51:14 pm »
I think, Subject to error, possible misremembering and confusion on my part.

The (rather old now), physical calculators, especially 8 digit, simple/basic ones, but with a percentage key.  Changed a '1', based on the percentage entered.
E.g. 10% would create a 0.1
25% would make 0.25
etc.
So, relatively 'old' calculators (I haven't tested this theory out), would be 9 - 10% = 8.9

But relatively modern calculators, would calculate it properly (as intended), and hence 9 - 10% = 8.1

I.e. at some point in the past, when calculators became more powerful, the way percentages worked (on calculators), changed.

Edit:
The following article, seems to explain more about these calculator percentages.  Such as why it works the way it does, and how the functionality is NOT necessarily the same, between major calculator manufacturer's.

https://devblogs.microsoft.com/oldnewthing/20080110-00/?p=23853
« Last Edit: December 15, 2024, 03:26:28 pm by MK14 »
 

Online RFDx

  • Regular Contributor
  • *
  • Posts: 186
  • Country: de
Re: A warning to engineers about calculators
« Reply #70 on: December 15, 2024, 03:28:10 pm »
Quote from: golden_labels
All calculators consistently give 8.1.

No. The Casio calculator shows 8.9, the correct value. 10% (or simply 10/100) is 0.1. Always.
With the calculator apps the standalone value of 10% is 0.1 but changes suddenly to 0.9 when I subtract it from 9.

Quote from: golden_labels
5 V ±10 %” is range [4.95, 5.05] V, not [4.9, 5.1] V. If you thought different… maybe it’s time to check all your designs?

Is this some kind of alternative math I'm not aware of?
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1504
  • Country: pl
Re: A warning to engineers about calculators
« Reply #71 on: December 15, 2024, 03:58:12 pm »
If you want something actually unexpected: HMD’s model Nokia 225 4G. Guess what x % y returns. The “most obvious thing” of course: 100 · x / y. :D

No. The Casio calculator shows 8.9, the correct value. 10% (or simply 10/100) is 0.1. Always.
That’s one example, compared to multiple others you yourself have listed. All of which give the same, consistent behavior.

With the calculator apps the standalone value of 10% is 0.1 but changes suddenly to 0.9 when I subtract it from 9.
Yes, all consistently give -10% · 9 being -0.9. All of them, you yourself said that.

The other one is a different scenario, because percentage is not used in an expression. Strictly speaking percentage can’t be used without a reference value, but sometimes that reference is implied, so it may be convenient to have that kind of a conversion too.

Quote from: golden_labels
Is this some kind of alternative math I'm not aware of?
No, a misspelling typing an example quickly. The first range should be [4.5, 5.5]. Corrected.
« Last Edit: December 15, 2024, 04:00:07 pm by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 569
  • Country: ie
    • LinkedIn
Re: A warning to engineers about calculators
« Reply #72 on: December 15, 2024, 05:23:53 pm »
% operation here is a dual semantics operation, dependent of context. If you use it in expression of form <expr1> +/- <expr2>% it converted to <expr1> +% / -% <expr2>. (here +% and -% are defined as binary operation that add/subtracts <expr2> percents from <expr1>)
In any other context it means multiplication to 0.01.

Is it sounds logical? - Yes. Should it be implemented in this way? NO! And 2 pages of discussion here is an evidence of this.
 
The following users thanked this post: KE5FX

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1504
  • Country: pl
Re: A warning to engineers about calculators
« Reply #73 on: December 15, 2024, 06:33:50 pm »
I wonder, how long such threads would be, if people did read earlier posts. Maybe half of the messages would be avoided, if anybody noticed their claims are already addressed earlier? Who knows, who knows…
People imagine AI as T1000. What we got so far is glorified T9.
 

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 4077
  • Country: us
Re: A warning to engineers about calculators
« Reply #74 on: December 15, 2024, 06:58:59 pm »
Could you possibly mean warning about calculators that give the correct answer?  That thread should be quite short, but then, maybe I missed the point.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf