The Museum of HP Calculators

HP Forum Archive 14

[ Return to Index | Top of Index ]

Rad vs Deg accuracy
Message #1 Posted by Rick May on 25 Feb 2005, 2:53 p.m.

I was wondering, I did the asin(acos(atan(tan(cos(sin(9)))))) and got 8.99999864267 of course. If I convert to 9 into Radians and do the same operation in RAD mode and convert the number back to degrees I get 9.00000000009. So the question is, why is the radians mode so much more accurate? Or am I missing something? If it is more accurate, why not just have the calc do all operations in Rad and just convert to and from degrees?

      
Re: Rad vs Deg accuracy
Message #2 Posted by bill platt on 25 Feb 2005, 3:00 p.m.,
in response to message #1 by Rick May

Hi Rick,

1st of all, the supposed "accuracy" is a bit of a red herring here. You are effectively "pushing digits off a cliff" as you take these nested sin/cos/tan operations. So, it is not a real-life test of accuracy. In real life, you generally have most of the significant digits of your problem intact.

2nd, again in real life, you have so many sigfigs in the calculator, that it really doesn't matter which mode you choose, if an issue of truncation is occurring, it is at a far decimal place.

If you actually need all those places, then you are in a special league....

Regards,

Bill

      
Re: Rad vs Deg accuracy
Message #3 Posted by hugh steers on 25 Feb 2005, 7:58 p.m.,
in response to message #1 by Rick May

its because in deg mode, the machine is treating each of sin, cos and tan as degree arguments and performing deg->rad conversion for *each* one. then in each of atan, acos & asin its performing the opposite each time. whilst in rad mode there are no conversions except the first and final ones manually performed.

      
Re: Rad vs Deg accuracy
Message #4 Posted by Gunnar Degnbol on 26 Feb 2005, 9:58 a.m.,
in response to message #1 by Rick May

It is two completely different calculations. sin(9) returns sine of 9 degrees or 9 radians, two very different numbers, and then you go on doing calculations on the result, interpreting angles as degrees or radians.

tan(cos(sin(9))) is meaningless because sin and cos does not return an angle in either degree or radian mode.

I think Valentin Albillo has pointed out that sin 9° = 0.1564, and cos 0.1564° is very close to 1, where all the meaningful digits are much smaller than 1 and get rounded off.

The same pathological case does not happen for the calculation in radians mode, because the numbers are completely different and in radians mode "less than one" is not the same as "very small".

      
Re: Rad vs Deg accuracy
Message #5 Posted by db (martinez, ca.) on 27 Feb 2005, 1:39 p.m.,
in response to message #1 by Rick May

Here is Mike Sebastian's idea on using radians in the forensics algorithm. http://www.rskey.org/~mwsebastian/miscprj/radians.htm


[ Return to Index | Top of Index ]

Go back to the main exhibit hall