Bug: HP Prime can't do Log's
|
12-15-2015, 07:43 AM
(This post was last modified: 12-15-2015 08:45 AM by davimle.)
Post: #21
|
|||
|
|||
RE: Bug: HP Prime can't do Log's
OK, I was fascinated and curious about the numerical methods pathological cases posed in the paper linked by @Fortin. Now that my daughter is home with her Prime, I figured it was time for a calculator smack-down! Here are the contenders:
Now onto the rounds.... For the classic: 1/3 * 3 - 1 Code: Prime (Home): -0.000000000001 And the slightly more complicated: 1/3 * 3 - 0.99 - 0.01 Code: Prime (Home): -0.000000000001 Now for the very small differences: 1 + 1E-13 - 1 [Note: I debated about whether I should adjust this to 1E-14 for the calculators that are using 15 digits, however, it seems their threshold is also 1E-13.] Code: Prime (Home): 0 Now for the very small differences: 1 + 1E-13 - 0.99 - 0.01 Code: Prime (Home): 0 So surprisingly, the iOS "free" built-in calculator was the only one to get the correct answer in all 4 calculator torture tests. Too bad it is such a pain to use. I am disappointed that pCalc compares so badly to the calculator that comes bundled for free. Seems they should compare results across several other calculators. Now if I could just have an HP Prime calculator app for my iPhone 6+. |
|||
12-15-2015, 08:11 AM
Post: #22
|
|||
|
|||
RE: Bug: HP Prime can't do Log's
(12-14-2015 07:55 PM)Tim Wessman Wrote: So I guess you are saying every calculator HP has ever made that doesn't compute TAN(ATAN(1)) to be exactly 1 should have been recalled? (I'm pretty sure only the 49/50 in CAS mode would return that btw) Tim, these calculations involve intermediate (rounded) 12-digit results. From the user's perspective, LOG(81,3) is a single function, much like ^ or XROOT (I'm referring to the 48 as I do not have a Prime). Yet XROOT(4,81) does return 3, exactly - even if, internally, it's also implemented using natural logs and exponentiation. The same ought to be possible with log? Cheers, Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
12-15-2015, 11:57 AM
Post: #23
|
|||
|
|||
RE: Bug: HP Prime can't do Log's
Davimle, for completeness, you should add the settings of the prime during the test as we have seen that they make a difference at least for what is displayed on the screen.
|
|||
12-15-2015, 01:28 PM
Post: #24
|
|||
|
|||
RE: Bug: HP Prime can't do Log's
(12-15-2015 07:43 AM)davimle Wrote: Now for the very small differences: 1 + 1E-13 - 1 Prime regular carries only 12 digits for intermediate results, so 1. + 1e-13 equals 1. No fiddling here (or anywhere, on HP calcs!) Prime CAS uses binary floating point, I seem to remember from Bernard's posts a while ago. And 0.99 and 0.01 are not exactly representable in binary, hence the small errors. Cheers, Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
12-15-2015, 01:35 PM
(This post was last modified: 12-15-2015 01:54 PM by Fortin.)
Post: #25
|
|||
|
|||
RE: Bug: HP Prime can't do Log's
(12-15-2015 07:43 AM)davimle Wrote: OK, I was fascinated and curious about the numerical methods pathological cases posed in the paper linked by @Fortin. Now that my daughter is home with her Prime, I figured it was time for a calculator smack-down! What I find interesting is the behavior and selection of the 1e-13 for the TI. I believe it was intentionally chosen because it is 'available' to use, but just not displayed. A digit in that place will cause rounding of the last shown decimal place (1e-12), for example. Because the Prime doesn't play "have and hide" of this decimal place, 1e-12 may be a more appropriate test -- for it. On the TI-85 (for example): .1234567890123 displays as .123456789012 but .1234567890125 displays as .123456789013 Also on the TI-85, entering: .1234567890123 And then repeatedly pressing enter to the following: Ans+1e-13 Will accumulate in the hidden decimal place until it rounds up the last shown place. I'd rather see a complete approximate result than be wondering what it's not showing me... In other words, is that "4" really a "4" or does it just look like one? This behavior would lead to issues where '4' as a variable would not equal 4 as a number. >:-| However, on the newer TIs, this place is dropped under certain conditions so that the displayed '4' is more likely a '4'... even if it isn't. So, getting back to the original issue... on the TI-85, ln(81)/ln(3) returns "4". If one then evaluates: Ans==4, it returns 0 (false). |
|||
12-15-2015, 02:03 PM
Post: #26
|
|||
|
|||
RE: Bug: HP Prime can't do Log's
(12-15-2015 08:11 AM)Werner Wrote: From the user's perspective, LOG(81,3) is a single function, much like ^ or XROOT (I'm referring to the 48 as I do not have a Prime). Indeed. We agree and have switched that to use 15 digits as well for the "two inputs are real numbers" case. That should resolve the original problem. Thanks for your always insightful posts over the years! TW Although I work for HP, the views and opinions I post here are my own. |
|||
12-15-2015, 03:14 PM
Post: #27
|
|||
|
|||
RE: Bug: HP Prime can't do Log's
(12-15-2015 02:03 PM)Tim Wessman Wrote: Indeed. We agree and have switched that to use 15 digits as well for the "two inputs are real numbers" case. That should resolve the original problem. Thanks for your always insightful posts over the years! Tim, thank you for your continued efforts to resolve problems such as these in a proper manner instead of masking the real underlying issues. |
|||
12-16-2015, 06:32 PM
Post: #28
|
|||
|
|||
RE: Bug: HP Prime can't do Log's
@ndzied1 I'd be happy to do that, can you tell me which ones of were of interest? (There are so many settings on the Prime.) I can tell you that we used Number Format = Standard ("Full-precision display", according to user guide) if that is what you were asking.
@Werner & @Fortin thank you for the clarification. My misunderstanding here. I thought from the discussion that the Prime was carrying 15 digits, but only displaying 12. (Especially since 15 digits seemed to be common across other calculators.) Sounds like intermediate answers are always rounded to 12 digits? If so, then the "error term" should be changed to 1E-12 for the Prime. (I don't have the calculator with me again, but as I recall, I had tried 1E-12 and the Prime got the right answer.) I certainly appreciate WYSIWYG, so appreciate this decision with the Prime. In a weird twist, I wonder if people find the TI calculators to be more precise with 15 digits than the HP Prime with 12 digits? (This must give marketing folks at HP fits.) @Time Wessman thanks again. Looking forward to a firmware update (someday) where the fix to LOG(A,B) will be included. Thanks again everyone, this has been a very enlightening discussion. I am now very curious what the iOS built-in calculator is doing! Maybe they just carry a ridiculously large number of (pure decimal) digits? I guess this may be possible on modern computers and phones where computational speed of hand calculators is not an issue. (The manual entry is definitely the limiting factor!) Thank you @Werner for explaining that CAS mode is using binary to represent floating point numbers. I guess this is the traditional problem of binary computers trying to do decimal math. (And explains why the precision gets further off than expected.) It seems like CAS in particular would want to stay in decimal for non-integers. It is fun to imagine a "teaching" calculator that could do decimal calculations to arbitrary precision essentially "long-hand". Seems like for anything involving manual entry we are to the point where the machine can keep up. Or maybe just switching to IEEE 754 decimal128 would be "good enough". |
|||
12-16-2015, 06:55 PM
Post: #29
|
|||
|
|||
RE: Bug: HP Prime can't do Log's
(12-15-2015 07:43 AM)davimle Wrote: Now if I could just have an HP Prime calculator app for my iPhone 6+. Wow! It's as if someone read my mind, or if Santa's elves were busy. http://www.hpmuseum.org/forum/thread-5346.html Thank you! thank you! thank you! Just bought it. Now I have a (virtual) Prime of my own and can stop "stealing" my daughter's away. This will also be very helpful for her in case she forgets to bring the calculator with her. I'm so excited, that I'm giddy. Also, those of you who are parents, I don't know if this was very carefully planned by HP marketing, or just happened to work out, but the $24.99 (iOS) price fits just below the $25 gift limit for teachers at my daughter's school. So you know what my daughter's math teacher, who already has shown an interest in the Prime, will be getting for Christmas! Hoping this will help turn the tide in the U.S. of only teaching to the TI's. |
|||
12-21-2015, 07:41 AM
Post: #30
|
|||
|
|||
RE: Bug: HP Prime can't do Log's
To be honest I would have preferred if the manpower for ios adaption had been pushed into working on the actual firmware. One man is happy, others are sad.
Although I agree that money-wise deciding to priorize the ios app is likely to be correct. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)