Post Reply 
[WP34s] Unexpected results in fraction mode
06-11-2014, 01:06 PM (This post was last modified: 06-11-2014 01:11 PM by Dieter.)
Post: #1
[WP34s] Unexpected results in fraction mode
I just did a few calculations in fraction mode and got some results I would not have expected. Note: DECM is "H.d" on the 34s keyboard.

Code:
  keys           display
  [.] 1 [.] 6
     [ENTER]     1/6
     [1/x]       5 1/1
     [DECM]      6    // actually 5,999999...9

  [.] 3 [.] 1    // enter 3 and set fraction mode again
     [sqrt]      1 5822/7953
     [x²]        2 1/1
     [DECM]      3    // actually 2,999999...9

Another example: 7/120 – 1/17 = –1/2040

Code:
  keys           display
  [.] 7 [.] 120
  [ENTER]        7/120
  17 [1/x]       1/17
  [-]           -1/2040

  [1/x]         -2039 1/1
  [DECM]        -2040

Hm. The 34s obviously does not round up (standard RM 0 was set), resp. it does not simplify 5 1/1 to a plain 6 or 2039 1/1 to 2040. Unlike my trusted 35s:

Code:
  keys           display
  [FDISP]
  6 [1/x]        0 1/6
    [1/x]        6
  [FDISP]        5,99999999999

  [FDISP]
  [.] 7 [.] 120
  [ENTER]        0 7/120
  17 [1/x]       0 1/17
  [-]           -0 1/2040

  [1/x]         -2040
  [FDISP]       -2039,99999971

Is this the intended way of displaying near-integers or is it a... hm... "special feature" of the 34s? Why does it do this "1/1" thing?

There is another thing I would not have expected, and this time I would consider it a bug. Do the 7/120 – 1/17 example again and round the result:

Code:
  keys           display
  [.] 7 [.] 120
  [ENTER]        7/120
  17 [1/x]       1/17
  [-]           -1/2040

  [1/x]         -2039 1/1    // result is -2039 1/1 or -2040

  [ROUND]        2040 0/1    // result has lost its sign, now it is positive!
  [DECM]         2040

I think this should get corrected.

Dieter
Find all posts by this user
Quote this message in a reply
06-11-2014, 06:14 PM
Post: #2
RE: [WP34s] Unexpected results in fraction mode
(06-11-2014 01:06 PM)Dieter Wrote:  I just did a few calculations in fraction mode and got some results I would not have expected. Note: DECM is "H.d" on the 34s keyboard.

[code] keys display
[.] 1 [.] 6
[ENTER] 1/6
[1/x] 5 1/1
[DECM] 6 // actually 5,999999...9

For reference only, here's what the Prime's fraction button yields in Home view (rev 6030 only):

FIX 11 mode: 400,000,000,001 / 66,666,666,667 (or 5 + 66,666,666,666 / 66,666,666,667).
This is the simplest fraction that rounds to 5.99999999999.
I think Prime is the only calculator in the world that finds this result, due to its superior fraction algorithm. Wink

STD or FIX 10 (or less): 6.
As expected.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
06-11-2014, 08:48 PM
Post: #3
RE: [WP34s] Unexpected results in fraction mode
Dieter,

please check the build you're using. I can't reproduce your results #1 and 2 (I get 6 and 3 sharp with build 3658), and I faintly remember we had such a rounding problem months ago.

d:-?
Find all posts by this user
Quote this message in a reply
06-11-2014, 11:11 PM
Post: #4
RE: [WP34s] Unexpected results in fraction mode
(06-11-2014 08:48 PM)walter b Wrote:  please check the build you're using. I can't reproduce your results #1 and 2 (I get 6 and 3 sharp with build 3658), and I faintly remember we had such a rounding problem months ago.

Well, this is build 3.3 3658 (with printer and timer support) on a hardware 34s. Fraction mode is DENANY with DENMAX set to 0.

I tried the latest classic emulator, which is version 3.2 3472. Here I indeed get a plain 6 resp. 3. But not with the current version on real hardware: it's 5 1/1.

The latest Qt-based emulator has version 3.3 3605. It shows the same behaviour as reported for version 3658: it's 5 1/1 here either.

There also is another difference between both emulators (probably due to the two different firmware versions): while entering [.] 1 [.] 6 the earlier version (with the correct 6/1 result) shows 0,1,6 during entry, while the newer version (Qt-based emulator, hardware 34s) displays 0 1/ as soon as the second [.] is pressed.

And don't forget the sign bug. This one is also present on the older emulator version.

Dieter
Find all posts by this user
Quote this message in a reply
06-12-2014, 04:57 AM
Post: #5
RE: [WP34s] Unexpected results in fraction mode
Sieht so aus, als ob da etwas kaputtrepariert worden ist. Sad

Thankyou for reporting. We'll look into it.

d:-)
Find all posts by this user
Quote this message in a reply
06-12-2014, 07:44 AM
Post: #6
RE: [WP34s] Unexpected results in fraction mode
(06-11-2014 11:11 PM)Dieter Wrote:  
(06-11-2014 08:48 PM)walter b Wrote:  please check the build you're using. I can't reproduce your results #1 and 2 (I get 6 and 3 sharp with build 3658), and I faintly remember we had such a rounding problem months ago.

Well, this is build 3.3 3658 (with printer and timer support) on a hardware 34s. Fraction mode is DENANY with DENMAX set to 0.

I tried the latest classic emulator, which is version 3.2 3472. Here I indeed get a plain 6 resp. 3. But not with the current version on real hardware: it's 5 1/1.

The latest Qt-based emulator has version 3.3 3605. It shows the same behaviour as reported for version 3658: it's 5 1/1 here either.

There also is another difference between both emulators (probably due to the two different firmware versions): while entering [.] 1 [.] 6 the earlier version (with the correct 6/1 result) shows 0,1,6 during entry, while the newer version (Qt-based emulator, hardware 34s) displays 0 1/ as soon as the second [.] is pressed.

OK, emulator build 3653 seems to be OK - build 3658 doesn't. Pauli, Marcus?

d:-)
Find all posts by this user
Quote this message in a reply
06-12-2014, 08:03 AM
Post: #7
RE: [WP34s] Unexpected results in fraction mode
(06-12-2014 07:44 AM)walter b Wrote:  OK, emulator build 3653 seems to be OK - build 3658 doesn't. Pauli, Marcus?

There are no display changes between those two revisions apart from changing < to LT and > to GT. Since these are changes of text strings only, I very much doubt they are the cause.

I think the fraction mode display changes are the likely culprit. Bit I think but I'm not sure -- I haven't looked into these in much detail.


- Pauli
Find all posts by this user
Quote this message in a reply
06-12-2014, 08:43 AM
Post: #8
RE: [WP34s] Unexpected results in fraction mode
Version 3.3 3645 & 3.3 3599 show the aberrant behaviour.
Find all posts by this user
Quote this message in a reply
06-12-2014, 12:15 PM
Post: #9
RE: [WP34s] Unexpected results in fraction mode
(06-11-2014 06:14 PM)Joe Horn Wrote:  For reference only, here's what the Prime's fraction button yields in Home view (rev 6030 only):

FIX 11 mode: 400,000,000,001 / 66,666,666,667 (or 5 + 66,666,666,666 / 66,666,666,667).
This is the simplest fraction that rounds to 5.99999999999.

Here we see what can be done with sufficiently large denominators. ;-) The usual midrange calculators as well as the 34s are limited to values like 4095 or 9999.

Quote:I think Prime is the only calculator in the world that finds this result, due to its superior fraction algorithm. Wink

I suppose it's simply the larger denominator. <8)

Quote:STD or FIX 10 (or less): 6.
As expected.

Now that's an interesting point. Do the Prime's results in fraction mode depend on the display setting? This would make some sense ("show the best fraction that agrees with X rounded to four places").

Dieter
Find all posts by this user
Quote this message in a reply
06-12-2014, 01:45 PM (This post was last modified: 06-12-2014 01:48 PM by walter b.)
Post: #10
RE: [WP34s] Unexpected results in fraction mode
(06-12-2014 07:44 AM)walter b Wrote:  OK, emulator build 3653 seems to be OK - build 3658 doesn't. Pauli, Marcus?

Correction: Build 3653 shows the error as well (after RESET). Together with Gerald's observations this points to the error being present for build number 3599 and later. Just FYI.

d:-/
Find all posts by this user
Quote this message in a reply
06-12-2014, 01:58 PM (This post was last modified: 06-12-2014 02:13 PM by walter b.)
Post: #11
RE: [WP34s] Unexpected results in fraction mode
(06-12-2014 01:45 PM)walter b Wrote:  Together with Gerald's observations this points to the error being present for build number 3599 and later.

We must extend that range to build 3405 at least. That's mid-2013. Could it be we never fixed that? Confused
Find all posts by this user
Quote this message in a reply
06-12-2014, 06:29 PM
Post: #12
RE: [WP34s] Unexpected results in fraction mode
(06-11-2014 06:14 PM)Joe Horn Wrote:  FIX 11 mode: 400,000,000,001 / 66,666,666,667 (or 5 + 66,666,666,666 / 66,666,666,667).
This is the simplest fraction that rounds to 5.99999999999.

STD or FIX 10 (or less): 6.
As expected.

My HP Prime returns 5.99999999999 in Standard [Home] (!?)
Find all posts by this user
Quote this message in a reply
06-12-2014, 10:29 PM
Post: #13
RE: [WP34s] Unexpected results in fraction mode
(06-12-2014 07:44 AM)walter b Wrote:  OK, emulator build 3653 seems to be OK - build 3658 doesn't. Pauli, Marcus?

I've committed a work around I'm not entirely happy with but it will do for the moment.


Pauli
Find all posts by this user
Quote this message in a reply
06-13-2014, 01:12 PM
Post: #14
RE: [WP34s] Unexpected results in fraction mode
(06-12-2014 10:29 PM)Paul Dale Wrote:  
(06-12-2014 07:44 AM)walter b Wrote:  OK, emulator build 3653 seems to be OK - build 3658 doesn't. Pauli, Marcus?

I've committed a work around I'm not entirely happy with but it will do for the moment.


Pauli

New builds for both the 34S and the 31S are on SF.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
06-13-2014, 01:49 PM
Post: #15
RE: [WP34s] Unexpected results in fraction mode
(06-13-2014 01:12 PM)Marcus von Cube Wrote:  
(06-12-2014 10:29 PM)Paul Dale Wrote:  I've committed a work around I'm not entirely happy with but it will do for the moment.


Pauli

New builds for both the 34S and the 31S are on SF.

... and even better: they solve the problems reported by Dieter.

d:-)
Find all posts by this user
Quote this message in a reply
06-13-2014, 09:46 PM
Post: #16
RE: [WP34s] Unexpected results in fraction mode
(06-13-2014 01:49 PM)walter b Wrote:  
(06-13-2014 01:12 PM)Marcus von Cube Wrote:  New builds for both the 34S and the 31S are on SF.

Yes – if you know where to find them.

Let's face it: the average user that is new to the project will never find the most recent version, let alone does he know what files are required. Let's assume you're on the 34s project homepage, i.e. http://sourceforge.net/projects/wp34s/. Klick on "files" and you see a file list as well as the complete package wp34s_v3.zip including the .bin files and the emulator – but all dating back to early February this year. Please, do not forget to list the latest file versions here. And please also remove that link that tells the user to download mysamba.zip if he wants to get the latest version. This is (sorry) simply nonsense. It is all buried deep down in the "code" section (which also includes binaries) in http://sourceforge.net/p/wp34s/code/HEAD...ndows/bin/, both the .bin files for flashing as well as the windows emulator .exe. But who would know this if he is not familiar with the details of the inner directory structure? This is not my first 34s download, but my only chance still is looking at the "date" column.

Please, guys - there was a time when you simply went to the start page and there was a .zip file with all that's required. This was the way it is supposed to be. Let us return to this.

Quote:... and even better: they solve the problems reported by Dieter.

Yes, the new emulator seems to work fine – thank you very much to you all. I am now going to update the real thing as well.

Dieter
Find all posts by this user
Quote this message in a reply
06-13-2014, 10:34 PM
Post: #17
RE: [WP34s] Unexpected results in fraction mode
Well, RTFM may help sometimes. Take p. 147 of the downloadable manual (v3.1), for example, or p. 165 of the printed one (v3.2) or p. 251 of the new one (v3.3). Smile

d:-)
Find all posts by this user
Quote this message in a reply
06-13-2014, 11:09 PM
Post: #18
RE: [WP34s] Unexpected results in fraction mode
(06-13-2014 10:34 PM)walter b Wrote:  Well, RTFM may help sometimes. Take p. 147 of the downloadable manual (v3.1), for example, or p. 165 of the printed one (v3.2) or p. 251 of the new one (v3.3). Smile

Let me see if I understand correctly what you mean. The user should visit the sourceforge website and continue to the "files" section where he will find files of an outdated software version. Here he will also find an outdated manual. Now he is supposed to read through that manual to page 140++ where he will finally find a link to the recent software. Yes?

Apart from all this: even the procedure above does not explain why the project's "files" page offers long outdated versions for download. And why there is a link to mysamba.exe claiming to lead to the "latest version". Is this really that hard to fix?

Dieter
Find all posts by this user
Quote this message in a reply
06-13-2014, 11:30 PM
Post: #19
RE: [WP34s] Unexpected results in fraction mode
(06-13-2014 11:09 PM)Dieter Wrote:  
(06-13-2014 10:34 PM)walter b Wrote:  Well, RTFM may help sometimes. Take p. 147 of the downloadable manual (v3.1), for example, or p. 165 of the printed one (v3.2) or p. 251 of the new one (v3.3). Smile

Let me see if I understand correctly what you mean. The user should visit the sourceforge website and continue to the "files" section where he will find files of an outdated software version. Here he will also find an outdated manual. Now he is supposed to read through that manual to page 140++ where he will finally find a link to the recent software. Yes?

Apart from all this: even the procedure above does not explain why the project's "files" page offers long outdated versions for download. And why there is a link to mysamba.exe claiming to lead to the "latest version". Is this really that hard to fix?

Things are simpler than you think. The user should get a manual whatever version (s)he prefers. Assume (s)he knows what a TOC is. Then (s)he shall simply use his/her brains (assume ... Wink) and (s)he shall land in App. A, start reading and find the information on the very first page. Since I wanted to help my counterpart to climb those steep steps I gave him a choice of page numbers (being a bit ... hmmh ... parsimonious he may not have a printed edition). So much about the manual which is my responsibility.
Find all posts by this user
Quote this message in a reply
06-14-2014, 04:13 AM
Post: #20
RE: [WP34s] Unexpected results in fraction mode
Marginally OT... originated with a Prime/WP34s comparison.

(06-12-2014 06:29 PM)Alberto Candel Wrote:  
(06-11-2014 06:14 PM)Joe Horn Wrote:  FIX 11 mode: 400,000,000,001 / 66,666,666,667 (or 5 + 66,666,666,666 / 66,666,666,667).
This is the simplest fraction that rounds to 5.99999999999.

STD or FIX 10 (or less): 6.
As expected.

My HP Prime returns 5.99999999999 in Standard [Home] (!?)

We're talking about fraction display mode. Try pressing the fraction key [a b/c].

(06-12-2014 12:15 PM)Dieter Wrote:  Do the Prime's results in fraction mode depend on the display setting? This would make some sense ("show the best fraction that agrees with X rounded to four places").

Yes, similar to the way the ->Q function works in the HP 48/49/50, controlled by the display setting.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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