HP Prime Miscalculating

11012015, 02:05 PM
(This post was last modified: 11012015 11:33 PM by Vtile.)
Post: #21




RE: HP Prime Miscalculating
(11012015 02:12 AM)Joe Horn Wrote:I'm sure 95% of the Prime users do not care how the CASmode handles numbers internally. Only thing they care is that it doesn't give right values. I assume when everyone is speaking about CASmode and internal handling of number (BCD vs. Floatingpoint) they mean CASengine, 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.(10312015 10:50 AM)Vtile Wrote: ... HP 50g calculates it correctly both in aprox and exact with or without XQ command used... (11012015 01:16 PM)Wes Loewer Wrote: Here's one I like to show my students each year. In Excel, enter the following: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 preanalysis 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/31)*31)/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/31)*31)/SIN(PI()/2) a value of 10,00E12 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/31)*31)/SIN(PI()/2) a value of DIVIDE BY 0 in ALG,DEG,ENG3 mode. (I don't like radians anyways) HP50g gives ((4/31)*31)/SIN(PI()/2) a value of 10,00E12 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 FXCP400 gives ((4/31)*31)/SIN(PI()/2) value of 0 (In both exact and aprox modes) Canon Card F54 (1980) gives ((4/31)*31)/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 F54 (1980) gives ((4/31)*31)/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! 

11042015, 05:57 PM
Post: #22




RE: HP Prime Miscalculating
(11012015 02:05 PM)Vtile Wrote: 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. Well, that's the nature of any numeric calculation which uses finite precision. Since the values are not stored exactly, you cannot expect to get exact results. The fact that ((4.0/3.01.0)*3.01.0) does not result in zero does not mean that the software is faulty. The "incorrect" result is simply an artifact of the way numbers are stored. Here are a few different results: Binary Storage: PrimeCAS: 1.42108547152e14 = (2^46) MS Excel: 2.22045E16 = (2^52) Maxima (50 decimals): 2.67276...e51 = (2^168) Decimal Storage: PrimeHome: 1.0e11 HP50g: : 1.0e11 TINpsire: 1.0e13 (11012015 02:05 PM)Vtile Wrote: SIN(Pi/2) should be precisely 0 and the answer... You probably meant COS(Pi/2)=0 or SIN(Pi) = 0. (SIN(Pi/2) = 1) This is a good example how how some calculators "lie" when they give you what you expect, not what the calculated result really is. On the ti calculators, the numeric value of pi is 3.1415926535898. The actual result of sin(3.1415926535898) is about 6.76e15, but when the calculator sees this special value, it returns the value 0 because that's what students expect/want to see. In other words, sometimes calculators attempt to hide the artifacts of finite precision. That's probably good for students, but it does drive numerical purists crazy. A simpler example is 1.0/3.0*3.0 . The exact result is 1 of course, but a finite precision calculation will result in something like 0.999999999 . 

11042015, 08:36 PM
(This post was last modified: 11042015 09:48 PM by Vtile.)
Post: #23




RE: HP Prime Miscalculating
Yep, copypaste error from wrong Excel cell on that Sin(Pi/2), it propably were COS(Pi/2)
... I'm too tired ... need to get to sleep sry, making silly mistakes on my math. Edit2. Classic cross eyed and dooms correct as an incorrect. (+.+) 

11062015, 07:55 AM
Post: #24




RE: HP Prime Miscalculating
(10312015 10:50 AM)Vtile Wrote: If the calculator is in exact mode set by user the CAS should behave according to that, while it is mathematically unorthodox solving answers like if user were using exact representation of given value instead of decimal value. In other words calculators CAS should expand (with silence or noting that "Unorthodox numerical format detected correcting user careless behaviour") the floating points to (36/10)²−4×(324/100) even if the user were typing the numbers in decimal format.You misunderstand what the exact setting means. In CAS, you can perform exact *and* approx computations. If exact mode is set, the kind of computation is determined by the input (exact input, exact computation, approx input, approx computation). If approx mode is set, it means that all entries are considered as approx, even if they look like exact (in other words an evalf is done on the arguments). 

09022018, 04:32 PM
Post: #25




RE: HP Prime Miscalculating  
« Next Oldest  Next Newest »

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