CORDIC in Degrees vs. Radians « Next Oldest | Next Newest »

 ▼ Mike Fikes Junior Member Posts: 7 Threads: 2 Joined: Jul 2011 07-23-2011, 12:27 PM On a Voyager (15C) in degrees mode, cos 60 = 0.5. The same is true for a Pioneer (20S). If, instead, this is performed in radians mode, first converting 60 degrees to radians using ->RAD, this results in ```15C: 0.5000000002 20S: 0.499999999997 ``` My question: How do these machines produce exactly the right answer when in degrees mode? Is CORDIC internally performed always either degrees or radians (with the necessary conversions of input being done first)? Or is it internally performed using the mode that the calculator is set to? ▼ Gerson W. Barbosa Posting Freak Posts: 2,761 Threads: 100 Joined: Jul 2005 07-23-2011, 01:36 PM HP calculators round the answer to the number of digits of the display. Thus, on the 32SII 60 -> RAD returns 1.04719755120, a worst approximation to pi/3 than 1.04719755119660 which would be used internally when in DEG mode. In RAD mode the internal results are ``` cos(1.04719755120 rad) = 0.499999999997054 cos(1.04719755119660 rad) = 0.499999999999998 ``` or ```0.499999999997 0.500000000000 ``` respectively, when rounded to 12 digits. Gerson. ▼ Mike Fikes Junior Member Posts: 7 Threads: 2 Joined: Jul 2011 07-23-2011, 02:06 PM Is the following accurate? When in degrees mode, the 15C internally converts the input to a radians representation that employs guard digits (in other words, a representation with more than 10 digits), which is then passed to the CORDIC routine. The (greater than 10-digit) output of CORDIC is then rounded to the 10 digits of the display. ▼ Gerson W. Barbosa Posting Freak Posts: 2,761 Threads: 100 Joined: Jul 2005 07-23-2011, 02:35 PM Yes, I think things occur like that. These past threads might be of interest to you: Edited: 23 July 2011, 2:37 p.m. ▼ Mike Fikes Junior Member Posts: 7 Threads: 2 Joined: Jul 2011 07-23-2011, 04:31 PM Yep, post #16 in the first thread you referenced indicated the following with respect to trig in degree mode on the 15C: Quote: For example, the HP41, HP15, etc., are known to do internal arithmetic with 13 digits although final results are only 10 digits. That is, a 13 digit approximation to PI/180 is used to convert the argument from degrees to radians. Thanks :) Eric Smith Posting Freak Posts: 2,309 Threads: 116 Joined: Jun 2005 07-24-2011, 04:49 AM It is possible to do CORDIC operations in degrees, grads, or other angular units, but generally HP calculators don't do that. They internally convert to radians. As Gerson has noted, they use extra digits in internal calculations to get a more accurate result than if you did the conversion from the keyboard. I say "generally" because I have no idea how models like the 6s, 8s, 9s, 9g, and 30s work internally.

 Possibly Related Threads... Thread Author Replies Views Last Post CORDIC Sok-khieng Chum Hun 3 610 04-28-2012, 08:33 PM Last Post: Eric Smith HP-35A/21 D.MS<-->Decimal degrees routines Matt Agajanian 9 1,296 03-29-2012, 11:03 AM Last Post: Matt Agajanian Degrees conversion for trigonometric function Beth Snipes 2 518 08-30-2011, 03:32 PM Last Post: Beth Snipes CORDIC Trigonometric Algorithm on an HP17BII Charles 4 727 03-14-2008, 12:14 AM Last Post: Eric Smith HP-35 and CORDIC-articles at Dr. Dobb's Karl-Ludwig Butte 2 517 11-25-2007, 04:11 AM Last Post: Karl Schneider Radians Question Vincze 55 4,538 08-20-2007, 08:56 AM Last Post: Vincze Angles in radians using expressions with PI?? Alex 3 614 03-18-2007, 02:09 AM Last Post: Alex HP33S bug subtracting degrees from minutes? John P 2 451 03-18-2005, 12:35 PM Last Post: Norris Sin(Pi) in Radians Mike 33 2,999 08-29-2004, 02:58 PM Last Post: Eddie Shore HP 41C - Converting From Radians to Degrees Mark McLean 14 1,365 04-28-2004, 10:45 PM Last Post: David Smith

Forum Jump: