newRPL: Angles revisited
03-31-2016, 08:40 PM
Post: #4
 Nigel (UK) Senior Member Posts: 347 Joined: Dec 2013
RE: newRPL: Angles revisited
A long time ago I wrote an RPN calculator program for the Casio FX-9860G calculator that uses angle tags in a similar way. I liked it; it would be nice to see something similar in newRPL.

My program has two buttons (D and R) which tag the number in the x register as degrees or radians respectively. If the x register already contains an angle tagged with D then pressing R converts it to radians and changes the tag to R, while pressing D removes the tag. So tagging and conversion are done with the same function.

In my program:
• Adding or subtracting two angles (e.g., 2D 1R +) gives an answer with the angle tag of the current angle mode. Adding or subtracting an angle and an untagged number works in the same way with the untagged number being implicitly tagged with the current angle mode. I don't like the idea of adding a number to an angle giving a number. In radian mode, 1 1D + and 1D 1 + should both mean the sum of 1 radian and one degree and should be tagged as an angle. I'm not too bothered about whether it is tagged as radians or degrees, but it is definitely an angle!
• There is no implicit tag when multiplying or dividing an angle by an untagged number.
• Dividing one angle by another gives an untagged result - the ratio of the two angles.
• In every other case (e.g., 2D 1R *) the angles are converted to the current angle mode, the tags are removed, and the calculation is carried out. It might be more sensible to throw an error in situations like these, although powers of angles might be meaningful in some cases.
• Dealing with trig and hyperbolic trig functions with complex arguments needs care!

Nigel (UK)
 « Next Oldest | Next Newest »

 Messages In This Thread newRPL: Angles revisited - Claudio L. - 03-31-2016, 06:13 PM RE: newRPL: Angles revisited - Han - 03-31-2016, 06:49 PM RE: newRPL: Angles revisited - Claudio L. - 04-01-2016, 12:50 AM RE: newRPL: Angles revisited - Helix - 04-01-2016, 05:33 PM RE: newRPL: Angles revisited - Han - 04-01-2016, 05:48 PM RE: newRPL: Angles revisited - Claudio L. - 04-01-2016, 06:22 PM RE: newRPL: Angles revisited - Nigel (UK) - 04-01-2016, 06:27 PM RE: newRPL: Angles revisited - emece67 - 04-01-2016, 07:01 PM RE: newRPL: Angles revisited - Claudio L. - 04-01-2016, 11:15 PM RE: newRPL: Angles revisited - emece67 - 04-01-2016, 11:46 PM RE: newRPL: Angles revisited - Nigel (UK) - 04-03-2016, 11:05 AM RE: newRPL: Angles revisited - Claudio L. - 04-04-2016, 12:04 AM RE: newRPL: Angles revisited - rprosperi - 03-31-2016, 06:54 PM RE: newRPL: Angles revisited - Claudio L. - 04-01-2016, 12:55 AM RE: newRPL: Angles revisited - rprosperi - 04-01-2016, 02:10 AM RE: newRPL: Angles revisited - Claudio L. - 04-01-2016, 03:47 PM RE: newRPL: Angles revisited - Guenter Schink - 04-01-2016, 09:58 PM RE: newRPL: Angles revisited - Nigel (UK) - 03-31-2016 08:40 PM RE: newRPL: Angles revisited - Claudio L. - 04-01-2016, 01:12 AM RE: newRPL: Angles revisited - Nigel (UK) - 04-01-2016, 06:20 PM RE: newRPL: Angles revisited - Claudio L. - 04-01-2016, 06:43 PM RE: newRPL: Angles revisited - Claudio L. - 04-01-2016, 07:11 PM RE: newRPL: Angles revisited - SlideRule - 04-03-2016, 04:27 PM RE: newRPL: Angles revisited - Vtile - 04-03-2016, 08:12 PM RE: newRPL: Angles revisited - Claudio L. - 04-03-2016, 11:58 PM RE: newRPL: Angles revisited - Claudio L. - 04-04-2016, 11:52 AM RE: newRPL: Angles revisited - Claudio L. - 04-06-2016, 01:58 PM RE: newRPL: Angles revisited - Nigel (UK) - 04-07-2016, 01:55 PM RE: newRPL: Angles revisited - Claudio L. - 04-07-2016, 05:51 PM RE: newRPL: Angles revisited - Helix - 04-07-2016, 01:04 PM RE: newRPL: Angles revisited - Claudio L. - 04-07-2016, 01:35 PM RE: newRPL: Angles revisited - Francois Lanciault - 05-10-2016, 04:48 AM RE: newRPL: Angles revisited - Claudio L. - 05-10-2016, 02:52 PM

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