Post Reply 
newRPL: Angles revisited
04-01-2016, 07:01 PM (This post was last modified: 04-01-2016 07:06 PM by emece67.)
Post: #16
RE: newRPL: Angles revisited
(04-01-2016 06:27 PM)Nigel (UK) Wrote:  So 30D 3 / gives 10D; 30D 3D / gives 10.

I agree that 30D 3 / is ambiguous - does 3 mean "3" or "3D" or "3R" in radians mode? - but I think that this is the best way to resolve the ambiguity.

I agree on this. On my view:
  • angle +/- scalar = scalar +/- angle = angle, with scalar meaning an angle in the same units as the other operand (30D + 1 = 31D, no matter the current angle mode)
  • angle * scalar = scalar * angle = angle, in the same units as the angular argument
  • angle / scalar = angle, in the same units as the angular operand
  • scalar / angle = scalar, the result is scalar/(angle converted to radians), 2 / 90D = 4/pi
  • angle * angle = scalar, the result being the product of the 2 angles converted to radians (90D * 100G = pi^2/4)
  • angle / angle = scalar, prior to the division, both angles are converted to the same unit (90D / 100G = 1)
  • unary minus: maintains the angle unit
  • trigs: work as expected (tagged arguments are taken into account, untagged ones are in the units given by the current angle mode)
  • inverse trigs: the result is in the units specified by the current angle mode, but see next
  • all others: if any operand is an angle, it is converted to radians

This way, the angular mode only specifies the format used by the direct trigs if the argument is not tagged, and in the inverse trigs to specify the output format.

Still, there are cases where this approach can give rise to funny/unexpected results. I really enjoy the questions raised by Claudio on this project!
Find all posts by this user
Quote this message in a reply
Post Reply 


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 - 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 - Claudio L. - 05-10-2016, 02:52 PM



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