Angle being re-writed on entering it - Printable Version +- HP Forums ( https://www.hpmuseum.org/forum)+-- Forum: HP Calculators (and very old HP Computers) ( /forum-3.html)+--- Forum: HP Prime ( /forum-5.html)+--- Thread: Angle being re-writed on entering it ( /thread-6323.html) |

Angle being re-writed on entering it - eried - 05-30-2016 05:08 AM
Hello, somebody in youtube asked me why if you enter: 1080°00'37'' you get 1080°00′37.00001″ ? I guess is probably how the calculator works with angles internally... but, is there any workaround to avoid these extra decimals? RE: Angle being re-writed on entering it - Joe Horn - 05-30-2016 08:26 PM
(05-30-2016 05:08 AM)eried Wrote: Hello, somebody in youtube asked me why if you enter: 1080°00'37'' you get 1080°00′37.00001″ ? If you highlight the result and press the DMS key again, you'll see the reason. When you key 1080°00'37'' and press Enter, the value that actually gets entered is 1080.01027778, which is the closest possible 12-digit approximation. THAT value expressed in DMS notation is 1080° + 37.000008". This is rounded in the display to 1080°00'37.00001" which is closer to the actual value than 1080°00'37". The problem is that the user THINKS that he entered exactly 1080°00'37'' into the calculator, whereas in fact he entered the decimal value 1080.01027778. This is yet another example of HP following the HP philosophy of "What You See Is What You Have, warts and all" as opposed to other manufacturers' philosophy of "What You See Is Not Really What You Have Because We Fudged It To Look Pretty Because That's What You Probably Wanted To See". RE: Angle being re-writed on entering it - leprechaun - 05-31-2016 04:45 AM
Wait, he had no chance to realize that he entered something different than he saw on dispaly and he typed in, did he? RE: Angle being re-writed on entering it - Joe Horn - 05-31-2016 05:43 AM
(05-31-2016 04:45 AM)leprechaun Wrote: Wait, Yes he did have a chance to realize it: by reading the owner's manual. Page 15 explains the DMS key, and explicitly states, "The HP Prime calculator will produce the best approximation in cases where an exact result is not possible." The same thing happens when entering polar points using the angle key (shift multiply); you only get the best approximate to what you key in, not exactly what you key in. Knowing things like this is one of the many benefits of reading the manual. RE: Angle being re-writed on entering it - chromos - 05-31-2016 05:45 AM
(05-31-2016 04:45 AM)leprechaun Wrote: Wait, It is always good to know limitations of equipment you use. :-) RE: Angle being re-writed on entering it - toshk - 05-31-2016 05:46 AM
this discrepancy/annoyance also exist when you enter example: 1.∡6.; at [Home] you get 1∡5.999999998 how do Hp explains that too? RE: Angle being re-writed on entering it - Dieter - 05-31-2016 06:59 AM
(05-31-2016 05:46 AM)toshk Wrote: this discrepancy/annoyance also exist when you enter example: 1.∡6.; at [Home] It's essentially the same reason. Probably the number is internally stored in rectangular coordinates, i.e. in this case cos(6) +i·sin(6). Rounded to 12 digits that's 0,994521895368+0,104528463268 · i. If this is converted back to get displayed in polar coordinates you get 1∡6,00000000002. Which BTW is exactly what my HP35s returns after entering 1∡6. A tiny variation in the last digit and you may also get 5,99999... Let us never forget: if you type sqrt(2) you will not get sqrt(2) but 1,41421356237. Press the Pi key and you will not get Pi but 3,14159265359. It's always just an approximation with 12 valid digits. If you're lucky. ;-) Dieter RE: Angle being re-writed on entering it - leprechaun - 05-31-2016 07:14 PM
My apologies, Joe. I was indeed not aware that the manual explained the behaviour explicitly. I'm looking forward to reading the reworked manual. :-) However it seems that op was folled by what he saw on the display.... RE: Angle being re-writed on entering it - eried - 05-31-2016 08:58 PM
I told the same to who asked me and all the technical explanations may seem geeky and all but at the end of the day some student want to add 1'1'' to 1080°00'37'' and get 1080°01′38... After all was not the prime targeted to casio/ti spoiled kids? RE: Angle being re-writed on entering it - Claudio L. - 06-01-2016 02:58 PM
(05-31-2016 08:58 PM)eried Wrote: I told the same to who asked me and all the technical explanations may seem geeky and all but at the end of the day some student want to add 1'1'' to 1080°00'37'' and get 1080°01′38... After all was not the prime targeted to casio/ti spoiled kids? You should try that on your new machine... no technical explanations needed, as numbers are stored "as entered" by the user. There's still some rounding issues after operating on them, but for the most part you get what you expect, with no fudging, no tricks. RE: Angle being re-writed on entering it - eried - 06-02-2016 06:31 PM
(06-01-2016 02:58 PM)Claudio L. Wrote:(05-31-2016 08:58 PM)eried Wrote: I told the same to who asked me and all the technical explanations may seem geeky and all but at the end of the day some student want to add 1'1'' to 1080°00'37'' and get 1080°01′38... After all was not the prime targeted to casio/ti spoiled kids? True. My new calculator is fantastic however the hard part here is finding the symbols for the angle min sec lol! RE: Angle being re-writed on entering it - retoa - 06-07-2016 02:38 PM
It is normal that machines have rounding "problems" (actually these are not really problems...) But then another question: to avoid such "problems" when you work with real numbers you can set the number format to have only a certain number of digits displayed, I normally work with floating 3. Now, also with floating 3, I obtain 1080°00'37.00001", with 5 digits after the digital point. Why? I know that 1080°00'37" has more then 4 digits, but I find the seconds value (which is the last) should be rounded at 4 (1+3) digits, so 1080°00'37.00 which would be represented as 1080°00'37" in floating mode, avoiding the rounding problem. |