HP Prime Miscalculating
11-01-2015, 02:05 PM (This post was last modified: 11-01-2015 11:33 PM by Vtile.)
Post: #21
 Vtile Senior Member Posts: 406 Joined: Oct 2015
RE: HP Prime Miscalculating
(11-01-2015 02:12 AM)Joe Horn Wrote:
(10-31-2015 10:50 AM)Vtile Wrote:  ... HP 50g calculates it correctly both in aprox and exact with or without XQ command used...

So does Prime, in Home, which uses BCD, like the HP 50g. The 50g does not have a non-BCD binary floating-point mode like the Prime's CAS. If you want 50g floating-point accuracy on the Prime, use Prime's Home view. That's what it's for.
I'm sure 95% of the Prime users do not care how the CAS-mode handles numbers internally. Only thing they care is that it doesn't give right values. I assume when everyone is speaking about CAS-mode and internal handling of number (BCD vs. Floatingpoint) they mean CAS-engine, right? If so why the UI is not designed to solve the issues related to engine, like that it can not solve the most simplistic elementary school level calculus correctly, makes me wonder.

(11-01-2015 01:16 PM)Wes Loewer Wrote:  Here's one I like to show my students each year. In Excel, enter the following:

=(4/3-1)*3-1

You should get zero. (On the Prime you get −1.42108547152e−14.) Now put an extra set of parentheses around the whole thing in Excel:

=((4/3-1)*3-1)

You now get -2.22045E-16.

To see the significance of these two values, try

=((4/3-1)*3-1)*2^52 in Excel and ((4/3-1)*3-1)*2^46 on the Prime.
Hmm.. Nice, hope my own teachers would have at some point shown that, I might have changed the hobby.
Interesting enough, I did found another "oddity" at my 50g to take account when creating programs. I also just learned that the industry standard is miscalculus [Edit. Meant that the algorithms lack of pre-analysis and CA before doing actual calculus). Eye opening, indeed.

PS EDIT. Finally with my Win PC and Excel, I have been running few days my HP mini laptop with linux.
Anyhow, that Excel thing is really interesting and works just as Wes Loewer says it would. If you want more error replace the given equation with =((4/3-1)*3-1)/SIN(PI()/2)
SIN(Pi/2) should be precisely 0 and the answer for the equation something like not declared, I'm not mathematician though and to be honest can't recall if there were given exception for case 0/0.
(*NOTE: PI() is language dependant in MS Excel and so might be SIN(), also the Radian/Degrees angle format might be.)

HP35S gives ((4/3-1)*3-1)/SIN(PI()/2) a value of -10,00E-12 in ALG,RAD,ENG3 mode. (Not too familiar with this calc though so I'm not avare if there is some "Use precision" mode somewhere hidden.)
HP35S gives ((4/3-1)*3-1)/SIN(PI()/2) a value of DIVIDE BY 0 in ALG,DEG,ENG3 mode. (I don't like radians anyways)
HP50g gives ((4/3-1)*3-1)/SIN(PI()/2) a value of -10,00E-12 with ->NUM and 0 with EVAL. (Random flags, in aprox mode ->NUM does nothing and EVAL gives aproximation, in exact mode values are as given)
CASIO ClassPad2 aka FX-CP400 gives ((4/3-1)*3-1)/SIN(PI()/2) value of 0 (In both exact and aprox modes)
Canon Card F-54 (1980) gives ((4/3-1)*3-1)/SIN(PI()/2) value of 2.8566(E)-08 in RAD mode. (Pretty obvious for such archaic "midrange" pocket calculator even more so with Pi aproximation.)
Canon Card F-54 (1980) gives ((4/3-1)*3-1)/SIN(180deg) a value of e as error.

Definedly adding the original and 0/0 variation to my notebook to try out things in future. - Sydämelliset kiitokset!
 « Next Oldest | Next Newest »

 Messages In This Thread HP Prime Miscalculating - luc4as - 10-23-2015, 02:35 AM RE: HP Prime Miscalculating - Joe Horn - 10-23-2015, 05:41 AM RE: HP Prime Miscalculating - retoa - 10-24-2015, 12:48 PM RE: HP Prime Miscalculating - parisse - 10-25-2015, 09:13 AM RE: HP Prime Miscalculating - Tim Wessman - 10-23-2015, 02:54 PM RE: HP Prime Miscalculating - retoa - 10-23-2015, 04:43 PM RE: HP Prime Miscalculating - Tim Wessman - 10-23-2015, 04:54 PM RE: HP Prime Miscalculating - Archanus - 10-23-2015, 07:38 PM RE: HP Prime Miscalculating - Nigel (UK) - 10-23-2015, 10:12 PM RE: HP Prime Miscalculating - Wes Loewer - 11-01-2015, 01:16 PM RE: HP Prime Miscalculating - Vtile - 11-01-2015 02:05 PM RE: HP Prime Miscalculating - Wes Loewer - 11-04-2015, 05:57 PM RE: HP Prime Miscalculating - Vtile - 11-04-2015, 08:36 PM RE: HP Prime Miscalculating - CyberAngel - 09-02-2018, 04:32 PM RE: HP Prime Miscalculating - retoa - 10-23-2015, 09:33 PM RE: HP Prime Miscalculating - retoa - 10-23-2015, 10:04 PM RE: HP Prime Miscalculating - Archanus - 10-24-2015, 02:20 AM RE: HP Prime Miscalculating - parisse - 10-24-2015, 06:37 AM RE: HP Prime Miscalculating - dan_h - 10-24-2015, 02:14 PM RE: HP Prime Miscalculating - cyrille de brébisson - 10-26-2015, 06:25 AM RE: HP Prime Miscalculating - retoa - 10-30-2015, 01:34 PM RE: HP Prime Miscalculating - parisse - 10-31-2015, 06:34 AM RE: HP Prime Miscalculating - Vtile - 10-31-2015, 10:50 AM RE: HP Prime Miscalculating - Joe Horn - 11-01-2015, 02:12 AM RE: HP Prime Miscalculating - parisse - 11-06-2015, 07:55 AM

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