Angle being re-writed on entering it
05-30-2016, 05:08 AM
Post: #1
 eried Senior Member Posts: 742 Joined: Dec 2013
Angle being re-writed on entering it
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?

My website: erwin.ried.cl
05-30-2016, 08:26 PM
Post: #2
 Joe Horn Senior Member Posts: 1,687 Joined: Dec 2013
RE: Angle being re-writed on entering it
(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″ ?

I guess is probably how the calculator works with angles internally... but, is there any workaround to avoid these extra decimals?

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".

<0|ɸ|0>
-Joe-
05-31-2016, 04:45 AM
Post: #3
 leprechaun Member Posts: 90 Joined: Mar 2015
RE: Angle being re-writed on entering it
Wait,

he had no chance to realize that he entered something different than he saw on dispaly and he typed in, did he?
05-31-2016, 05:43 AM
Post: #4
 Joe Horn Senior Member Posts: 1,687 Joined: Dec 2013
RE: Angle being re-writed on entering it
(05-31-2016 04:45 AM)leprechaun Wrote:  Wait,

he had no chance to realize that he entered something different than he saw on dispaly and he typed in, did he?

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.

<0|ɸ|0>
-Joe-
05-31-2016, 05:45 AM
Post: #5
 chromos Member Posts: 190 Joined: Jun 2015
RE: Angle being re-writed on entering it
(05-31-2016 04:45 AM)leprechaun Wrote:  Wait,
he had no chance to realize that he entered something different than he saw on dispaly and he typed in, did he?

It is always good to know limitations of equipment you use. :-)

Geocaching Coords Solver, Number of triangles Puzzle
05-31-2016, 05:46 AM (This post was last modified: 05-31-2016 05:46 AM by toshk.)
Post: #6
 toshk Member Posts: 193 Joined: Feb 2015
RE: Angle being re-writed on entering it
this discrepancy/annoyance also exist when you enter example: 1.∡6.; at [Home]
you get 1∡5.999999998
how do Hp explains that too?
05-31-2016, 06:59 AM
Post: #7
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: Angle being re-writed on entering it
(05-31-2016 05:46 AM)toshk Wrote:  this discrepancy/annoyance also exist when you enter example: 1.∡6.; at [Home]
you get 1∡5.999999998
how do Hp explains that too?

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
05-31-2016, 07:14 PM
Post: #8
 leprechaun Member Posts: 90 Joined: Mar 2015
RE: Angle being re-writed on entering it
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....
05-31-2016, 08:58 PM
Post: #9
 eried Senior Member Posts: 742 Joined: Dec 2013
RE: Angle being re-writed on entering it
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?

My website: erwin.ried.cl
06-01-2016, 02:58 PM
Post: #10
 Claudio L. Senior Member Posts: 1,709 Joined: Dec 2013
RE: Angle being re-writed on entering it
(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.
06-02-2016, 06:31 PM
Post: #11
 eried Senior Member Posts: 742 Joined: Dec 2013
RE: Angle being re-writed on entering it
(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?

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.

True. My new calculator is fantastic however the hard part here is finding the symbols for the angle min sec lol!

My website: erwin.ried.cl
06-07-2016, 02:38 PM
Post: #12
 retoa Member Posts: 168 Joined: Jan 2015
RE: Angle being re-writed on entering it
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.
 « Next Oldest | Next Newest »

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