Post Reply 
Pioneer vs RPL precision
06-07-2022, 02:26 PM
Post: #1
Pioneer vs RPL precision
Yesterday I was playing with EMU42 and realized that is some circumstances Pioneer calculators (no matter if RPN or algebraic) shows better precision than RPL models (from 28s to 50g).

The operation is the classic "(10/3)*3".

On any Pioneer and even 35s the result is always 10, even if calculated as a program or an algebraic expression

On any RPL model the result is:
- 9.9999999999 if calculated as "10 <ENTER> 3 / 3 *"
- 9.9999999999 if calculated as << 10 3 / 3 *>>
- 9.9999999999 if calculated as '10/3*3" <EVAL>
- 10 if the operation order is changed, i.e. '3*10/3', regardless the way it is calculated
The reason of RPL models behaviour appears logic to me, as the result of 10/3 is approximated and the error is propagated to the next operation. In '3*10/3" there is no approximation.

It is not clear to me how Pioneer models handles the approximation much better.
Find all posts by this user
Quote this message in a reply
06-07-2022, 03:38 PM (This post was last modified: 06-07-2022 03:45 PM by Didier Lachieze.)
Post: #2
RE: Pioneer vs RPL precision
(06-07-2022 02:26 PM)Marco Polo Wrote:  The operation is the classic "(10/3)*3".

On any Pioneer and even 35s the result is always 10, even if calculated as a program or an algebraic expression

It depends on the display settings (and rounding): with DISP>FIX 09 or FIX 10 you get 10, but with DISP>FIX 11 or DISP>ALL you get 9.9999999999 as on the RPL models.
Btw, this is the same on the HP Prime.
Find all posts by this user
Quote this message in a reply
06-07-2022, 04:09 PM
Post: #3
RE: Pioneer vs RPL precision
(06-07-2022 03:38 PM)Didier Lachieze Wrote:  
(06-07-2022 02:26 PM)Marco Polo Wrote:  The operation is the classic "(10/3)*3".

On any Pioneer and even 35s the result is always 10, even if calculated as a program or an algebraic expression

It depends on the display settings (and rounding): with DISP>FIX 09 or FIX 10 you get 10, but with DISP>FIX 11 or DISP>ALL you get 9.9999999999 as on the RPL models.
Btw, this is the same on the HP Prime.
I did not consider this.
As a matter of fact all the Pioneer roms i have default on FIX (something) while the RPL models default to ALL.
Furthermore, i never noted the peculiar behavior of Pioneer and RPL calculator under such conditions.
I would expect, for example with FIX 5, 9.99999 as result
Find all posts by this user
Quote this message in a reply
06-07-2022, 05:12 PM
Post: #4
RE: Pioneer vs RPL precision
(06-07-2022 04:09 PM)Marco Polo Wrote:  I would expect, for example with FIX 5, 9.99999 as result

The FIX setting does not change the internal value, only the way it is displayed. 9.9999999999 when displayed rounded to 5 decimal places is 10.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
06-07-2022, 06:33 PM
Post: #5
RE: Pioneer vs RPL precision
(06-07-2022 05:12 PM)Joe Horn Wrote:  The FIX setting does not change the internal value, only the way it is displayed. 9.9999999999 when displayed rounded to 5 decimal places is 10.

Now I know what it comes with, but it's not what I want.



After all these years I can finally recycle a previous comment.
Find all posts by this user
Quote this message in a reply
06-07-2022, 08:05 PM
Post: #6
RE: Pioneer vs RPL precision
(06-07-2022 06:33 PM)Thomas Klemm Wrote:  
(06-07-2022 05:12 PM)Joe Horn Wrote:  The FIX setting does not change the internal value, only the way it is displayed. 9.9999999999 when displayed rounded to 5 decimal places is 10.
Now I know what it comes with, but it's not what I want.
Exactly what I think about it....
Find all posts by this user
Quote this message in a reply
06-07-2022, 11:12 PM
Post: #7
RE: Pioneer vs RPL precision
(06-07-2022 08:05 PM)Marco Polo Wrote:  
(06-07-2022 06:33 PM)Thomas Klemm Wrote:  Now I know what it comes with, but it's not what I want.
Exactly what I think about it....

Please help me understand what you mean. Are you saying that you want FIX 5 to act like TRUNCATE 5, not ROUND 5? (I'm not trying to be obtuse... I really am not sure what you mean here).

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
06-07-2022, 11:52 PM
Post: #8
RE: Pioneer vs RPL precision
Dr William Kahan had a lot to say about this subject starting on page 144 of the following oral history.
http://history.siam.org/pdfs2/Kahan_final.pdf

"Hewlett-Packard had come out with a beautifully engineered job called the HP-35, which was the first scientific
calculator with all the scientific functions instead of just the add, subtract, multiply, divide, and
maybe a square root. And then they came out with the HP-45, which was an improved version. It
had more functionality.
But in the meantime, Texas Instruments came out with a calculator that was a great deal cheaper,
and here’s how they advertised their calculator. So TI had this advertisement in the papers. It was
a full-page advertisement. It said, “Type in your telephone number. Now,” they said, “Take the
logarithm.” The logarithm turns out to be a number form ten-point-something, or nine-pointsomething,
actually. “Now hit the exponential key. Do you get your phone number back? You do
on our calculator.” HP knew that it was the target of this advertisement because it did that on an
HP-45, which carried ten digits. You type in your ten-digit phone number, take the log, take the
exponential, and the last digit or two would change but, apparently, not on the TI calculator. HP
was very worried about this, because it seemed to impugn the integrity of their beast.

It was a very neat job, the HP-35, for all its faults—and it had lots. It was really a very nice
job, and then, of course, it went to
the HP-45, which was just sort of an expanded, extended version of the HP-35. And the other
guys were getting into the act. What one fool can do, another can, so TI had gotten into the act
using relatively similar algorithms.And HP was now embarrassed because it appeared that their calculator
was somehow defective, and they were worried about it—I mean, really worried about it. They thought they
had a certain reputation, and it was being undermined by this calculator. So fortunately, I asked what the
problem was all about, and I said, “Can you send me samples of the calculators for me to play
with before I come to the meeting?” And they did. So I had an HP-45, and I had an SR51.
And I discovered what was happening. It’s true that the HP-45’s arithmetic was somewhat grotty
in spots, but it wasn’t that bad. But what TI was doing was clever. You see, the 45 did its
arithmetic to ten significant decimals, period. Everything was done to ten significant decimals,
including the internal algorithms that computer logs and exponentials. TI was doing their
arithmetic internally carrying 13 significant decimals, but they only showed you ten. So that
meant that, though you type ten digits in, as soon as you did some arithmetic, you had 13
decimal digits. But you only saw ten significant decimals. Well, that could hide a lot of sins,
couldn’t it? The TI thing was cheaper, but that’s because Hewlett-Packard can’t do anything
that’s cheap there. Their whole culture is such that, whatever they do, it’s going to be expensive.
So I discovered that if you did this log exponential thing seven times, then the last digit would
change. You see, their arithmetic at the 13th digit was grottier, if anything could be grottier, than
the 45. And because it was worse arithmetic intrinsically, it meant that it didn’t take very long
for the error to creep up through those three digits. Seven times was enough. So I then was able
to turn up and say, “Look: everybody who looks at that ad is being fooled. They think that the TI
machine is reproducing your telephone number, but it isn’t. It’s your telephone number with a
last digit diminished by one, followed by a certain number of nines, like two nines and a digit.
Then it gets rounded up, you see, so it shows up properly in the display. They round in the
display, even though they don’t round the arithmetic.” I said, “You do this seven times, and then
you’re going to get something with your digit, less one, and followed by a four-something
something because the arithmetic is so crummy. After you’ve done it seven times, your
telephone number changes. Do you feel that that’s honest? Is this an honest ad?”
Well, certainly it’s got to be mysterious. Somebody who doesn’t realize what’s going on has to
find it mysterious that after he does this seven times, that digit changes. That was a shock, and
now they realized that they were in a world that was not the world they thought they were in.
Whatever the hell was going on, they really weren’t in control of it, but I also came with a
proposal to cure the problem. I said, “You can do what they do, except for one thing: in order to
be honest, round every result back to ten digits even if you carry thirteen to compute it.” And I
said, “If you do that, then each operation, taken by itself, will give you a rather honest answer,
and you can explain this log exponential thing. That’s easy because when you take the log,
you’ve got the right log. It’s correct to within just a little bit worse than half a unit in the last
digit of the display. Then you can say ‘Now, it’s that error that propagates when you take the
exponential because, if we recovered your telephone number, we’d be getting the exponential not
of the number that you see before you. It would have to be the exponential of something else.’’’"
Visit this user's website Find all posts by this user
Quote this message in a reply
06-08-2022, 05:12 AM (This post was last modified: 06-08-2022 05:16 AM by Marco Polo.)
Post: #9
RE: Pioneer vs RPL precision
(06-07-2022 11:12 PM)Joe Horn Wrote:  
(06-07-2022 08:05 PM)Marco Polo Wrote:  Exactly what I think about it....

Please help me understand what you mean. Are you saying that you want FIX 5 to act like TRUNCATE 5, not ROUND 5? (I'm not trying to be obtuse... I really am not sure what you mean here).
Using FIX 5 i expect to see 5 decimals.
The number is rounded for any FIX value,
In the specific case the calculators gives a "wrong" information, displaying a rounded (to zero decimals) number instead the expected five decimals.
I am not a mathematician nor an expert of calculators principles, so I may be wrong, but as an engineer I find this behavior quite disturbing.
Strangely, I never noted it since 1989....
.
Find all posts by this user
Quote this message in a reply
06-08-2022, 05:21 AM
Post: #10
RE: Pioneer vs RPL precision
Have you ever wondered what that SHOW key might be for?
Find all posts by this user
Quote this message in a reply
06-08-2022, 06:04 AM
Post: #11
RE: Pioneer vs RPL precision
(06-08-2022 05:21 AM)Thomas Klemm Wrote:  Have you ever wondered what that SHOW key might be for?

Of course. But generally you don't mind to use Show if you see a round value (i.e. An integer) in the stack.
Find all posts by this user
Quote this message in a reply
06-08-2022, 06:07 AM
Post: #12
RE: Pioneer vs RPL precision
(06-07-2022 11:52 PM)Steve Simpkin Wrote:  Dr William Kahan had a lot to say about this subject starting on page 144 of the following oral history.
http://history.siam.org/pdfs2/Kahan_final.pdf
Thank you for the explanation.
Things are now clearer.
Find all posts by this user
Quote this message in a reply
06-08-2022, 07:55 AM
Post: #13
RE: Pioneer vs RPL precision
(06-08-2022 05:12 AM)Marco Polo Wrote:  Using FIX 5 i expect to see 5 decimals.
The number is rounded for any FIX value,
In the specific case the calculators gives a "wrong" information, displaying a rounded (to zero decimals) number instead the expected five decimals.
I am not a mathematician nor an expert of calculators principles, so I may be wrong, but as an engineer I find this behavior quite disturbing.
Strangely, I never noted it since 1989....

Just tested on Plus42, set to "ALL" decimals.
It displays "10" but SHOW displays 9.999999999......

My understanding, now, is that hystorically the calculator design was aimed to display results in a "confortable" way for most people, hiding were possible the rounding errors and HP choosed the way to "hide" rounding errors only when FIXing the decimals.
If my understanding is correct, i can live with it :-)
Find all posts by this user
Quote this message in a reply
06-08-2022, 07:46 PM (This post was last modified: 06-08-2022 07:51 PM by ijabbott.)
Post: #14
RE: Pioneer vs RPL precision
(06-08-2022 05:12 AM)Marco Polo Wrote:  Using FIX 5 i expect to see 5 decimals.
The number is rounded for any FIX value,
In the specific case the calculators gives a "wrong" information, displaying a rounded (to zero decimals) number instead the expected five decimals.

3.00000 has five decimal places. Do you think the trailing zeroes don't count as proper digits? The calculator only strips trailing zeros after the decimal point in "ALL" mode.

(Yes, I realize I spelt zeros/zeroes two different ways. Both are correct.)

— Ian Abbott
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)