HP Forums
The case of the disappearing angle units, or "the dangle of the angle" - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not remotely HP Calculators (/forum-9.html)
+--- Thread: The case of the disappearing angle units, or "the dangle of the angle" (/thread-13388.html)

Pages: 1 2


The case of the disappearing angle units, or "the dangle of the angle" - ijabbott - 07-31-2019 07:34 PM

I know angles are technically dimensionless, but lots of people like to give them units nonetheless. This leads to situations where the units magically disappear or reappear unless extra steps are taken.

Consider the following examples (images shamelessly borrowed from mathsisfun.com)...

Area of a sector of a circle

[Image: circle-sector-area.svg]

\(A=\theta \cdot \frac{r^2}{2} \)

(for \(\theta\) in radians). To make the math work when angles have units, the above expression for area technically needs to be divided by 1 radian:

\(A=\frac{\theta}{1\,\textrm{rad}} \cdot \frac{r^2}{2} \)

Area of a segment of a circle

[Image: circle-segment-area.svg]

\(A=(\theta - \sin{\theta})\cdot\frac{r^2}{2}\)

That's different - we have an angle (in radians) minus its sine. To make that work, we need to divide the plain angle by 1 radian:

\(A=(\frac{\theta}{1\,\textrm{rad}}-\sin{\theta})\cdot\frac{r^2}{2}\)

Arc length of a sector of a circle

[Image: circle-arc-length.svg]

\(L = \theta \cdot r\)

Again, we need to divide the angle by 1 radian to get rid of the angular units:

\(L = \frac{\theta}{1\,\textrm{rad}} \cdot r \)

Question

Is it better to ignore angular units and just treat angles as plain old numbers (as long as an angle of 1 corresponds to 1 radian), or does the angular aspect have some cosmic significance that shouldn't be casually discarded? I guess this is more of a philosophical question, inspired by the way the WP-43S project plans to handle angles.


RE: The case of the disappearing angle units, or "the dangle of the angle" - Geoff - 08-01-2019 01:41 AM

A radian is not an independent unit as you are using it above. It is a dimensionless name.

In the ASTM SI-10 document a radian in base units is m/m (from Table 4), which self cancels out.

Quoting from clause 3.4.4.1 of SI-10 (2016) :

The coherent SI unit of plane angle is the number one; thus, the coherent SI units of the quantities angle, angular velocity, and angular acceleration are, respectively, 1, 1/s, and 1/s^2 . However, it is often convenient to use the special name radian (rad) instead of the number 1 when expressing the values of these quantities.

Note: ASTM SI-10 is titled the American National Standard for Metric Practice.


RE: The case of the disappearing angle units, or "the dangle of the angle" - ijabbott - 08-02-2019 07:45 AM

(08-01-2019 01:41 AM)Geoff Wrote:  A radian is not an independent unit as you are using it above. It is a dimensionless name.

In the ASTM SI-10 document a radian in base units is m/m (from Table 4), which self cancels out.

Quoting from clause 3.4.4.1 of SI-10 (2016) :

The coherent SI unit of plane angle is the number one; thus, the coherent SI units of the quantities angle, angular velocity, and angular acceleration are, respectively, 1, 1/s, and 1/s^2 . However, it is often convenient to use the special name radian (rad) instead of the number 1 when expressing the values of these quantities.

Note: ASTM SI-10 is titled the American National Standard for Metric Practice.

They could have really put the cat amongst the pigeons and defined the unit of plane angle as the number \(\mathrm{e}^\mathrm{i}\). Smile

(Yes, I know that doesn't really work as a unit as multiplication of the unit wouldn't work as expected.)


RE: The case of the disappearing angle units, or "the dangle of the angle" - Albert Chan - 08-02-2019 01:31 PM

On my XCas setup, I keep the default to RAD, and scale with deg = pi/180 if needed.
Switching back and forth between angle units is not worth the trouble.
Worse, sometimes it return wrong result.

Example:

XCas> deg := pi/180

XCas(RAD)> float(integrate(x+sin(x*deg), x = 30 .. 45)) // got back 571.605366361
XCas (DEG)> float(integrate(x+sin(x), x = 30 .. 45))       // OK, same as above

XCas(RAD)> float(integrate(x*sin(x*deg), x = 30 .. 45)) // got back 345.33893383
XCas (DEG)> float(integrate(x*sin(x), x = 30 .. 45))       // BAD !
Error while checking exact value with approximate value, returning both!
[-5.63193625867, 345.33893383]


RE: The case of the disappearing angle units, or "the dangle of the angle" - SlideRule - 08-02-2019 03:28 PM

Measurement Good Practice Guide No. 80
Fundamental Good Practice in Dimensional Metrology
David Flack
Engineering Measurement Services Team
Engineering Measurement Division
John Hannaford
First printed July 2005
Reprinted with minor corrections/amendments October 2012
ISSN 1368-6550
National Physical Laboratory
Hampton Road, Teddington, Middlesex, TW11 0LW

"Why are angle units special?
For the measurement of length it is necessary to adopt an ultimate standard, either a material standard such as the former Imperial Standard Yard or a natural standard such as the distance light travels in a certain time. No ultimate standard is required for angular measurement since any angle can be established by appropriate sub-division of the circle."[chapter 2 page 21]

BEST!
SlideRule


RE: The case of the disappearing angle units, or "the dangle of the angle" - ijabbott - 08-02-2019 05:06 PM

If \(\mathrm e^{\mathrm i \theta}\) is an angular displacement by the angle \( \theta \) (in a plane), I guess that means an angle is really \( -\textrm{i} \) multiplied by the natural logarithm of a corresponding angular displacement. Or am I getting horribly confused?


RE: The case of the disappearing angle units, or "the dangle of the angle" - Claudio L. - 08-03-2019 01:11 PM

(07-31-2019 07:34 PM)ijabbott Wrote:  Is it better to ignore angular units and just treat angles as plain old numbers (as long as an angle of 1 corresponds to 1 radian), or does the angular aspect have some cosmic significance that shouldn't be casually discarded? I guess this is more of a philosophical question, inspired by the way the WP-43S project plans to handle angles.

Oh, the joys of the angular units.
Basically, angles ARE just dimensionless numbers, but that doesn't really solve the problem, does it?
Let's say the user wants to add a number to an angle in degrees: do you consider the number to be in degrees? or the number to be in radians? or in the current angular system?
Then you have the inverse problem, like the area example you proposed: The user wants to calculate the area of an arc providing that angle in any system. But the formula only works if you divide by 1 radian or in other words: if the angle the user inputs is already in radians.
Here's how newRPL handles angles in the angle objects. It's a hack, but it does work the way the user expects 99% of the time without modifying the formulas.
I recently reworked my prior solution because I used to convert angles to numbers in the current angular system. That didn't work well for EXP(i*Theta) style expressions: multiplying the complex unit by the angle in degrees did not go well...
With the new solution, it converts to radians always, but then it has a problem when you do this for example: let's say you do SIN(90) and the system is in DEG mode. The SIN function takes an angle, but 90 is just a number, so you'd expect that number to be interpreted as an angle in degrees and return 1. But what if you have an actual angle with units and operate on it?

SIN( INV(INV(90°)))

Now you need to compute the INV() of an angle... so you convert those 90 degrees to pi/2, invert and later you invert again and end up with SIN(pi/2) but wait... in DEG mode SIN() was expecting a number in degrees, not in radians! How would the system know that when the user does SIN( INV(INV(90°))) it will receive the angle already in radians, but if the user just does SIN(90) it's in degrees?
A whole tracking system was put in place to determine if the arguments to SIN, COS and TAN were involved in any forced conversion to radians. It works but it's not foolproof, you can come up with some combinations of operations that can fool the system and still give a bad result (those combinations are typically meaningless so they don't come up naturally in formulas anyway, like the INV(INV(angle)) example).

That's one side of the story, using angle objects.

Then there's the old full-fledged unit system which tracks operations like INV(INV(90°)) without issues because it has the ability to work with units of °^-1. But... that system fails to recognize for instance that i*Theta needs to convert the system to radians. It keeps it in degrees, returning a complex number with a unit in degrees (0,90)_[°] (what the heck does that complex angle mean?) and the user would have to "manually" convert to radians so it doesn't solve the whole problem either. Radians, while a unit in itself, is non-dimensional so it's consistent with non-dimensional quantities (adding a number to an angle in radians is OK). This works well... except there's other non-dimensional units, and they are all consistent, so for instance you can add radians to decibels and that's fine because both are non-dimensional units (what does that even mean??).
For now you can't even do EXP(unit) in newRPL, because... what's the unit of e^(1_m)? e_[e^m]?? The unit system is equipped to deal with unit^n and even unit^(n/m) but no exp or log of units, that doesn't make physical sense.
So EXP needs non-dimensional arguments and will error if it's arguments have units... until somebody helps with an idea for a solution.

Then there's the third solution (the 49/50 series solution): whenever you have an expression that works with angles, you ask "Switch to radians?" and force the user to provide all arguments in radians, convert everything to radians and the problem is gone. It's a valid solution, but I hate the nagging though...


RE: The case of the disappearing angle units, or "the dangle of the angle" - Albert Chan - 08-03-2019 08:51 PM

(08-03-2019 01:11 PM)Claudio L. Wrote:  SIN( INV(INV(90°)))

Now you need to compute the INV() of an angle... so you convert those 90 degrees to pi/2, invert and later you invert again and end up with SIN(pi/2) but wait... in DEG mode SIN() was expecting a number in degrees, not in radians! How would the system know that when the user does SIN( INV(INV(90°))) it will receive the angle already in radians, but if the user just does SIN(90) it's in degrees?
A whole tracking system was put in place ...

Under DEG mode, my guess is 90° = 90, not pi/2

thus SIN(INV(INV(90°))) = SIN(90) = 1, as expected


RE: The case of the disappearing angle units, or "the dangle of the angle" - Claudio L. - 08-04-2019 12:02 PM

(08-03-2019 08:51 PM)Albert Chan Wrote:  Under DEG mode, my guess is 90° = 90, not pi/2

thus SIN(INV(INV(90°))) = SIN(90) = 1, as expected

Correct...
And what do you expect for EXP(i*90°)?
And what about (90°-SIN(90°))*r^2/2?

It's really hard to get it to work consistently because the user expects different things from different expressions and the system has no way to distinguish them.


RE: The case of the disappearing angle units, or "the dangle of the angle" - ijabbott - 08-05-2019 06:49 PM

I'd quite like a calculator where the standard trig functions only worked in radians, at least for writing programs. You could then have some non-standard trig functions such as SIND/ASIND for angles in degrees, etc., as well as functions for converting between angle units (so SIND would be more or less equivalent to D->R SIN, perhaps avoiding any D->R rounding error). If there is an angle mode setting, it would only affect which set of trig functions the keys map to.


RE: The case of the disappearing angle units, or "the dangle of the angle" - rprosperi - 08-06-2019 02:24 AM

(08-05-2019 06:49 PM)ijabbott Wrote:  I'd quite like a calculator where the standard trig functions only worked in radians, at least for writing programs. You could then have some non-standard trig functions such as SIND/ASIND for angles in degrees, etc., as well as functions for converting between angle units (so SIND would be more or less equivalent to D->R SIN, perhaps avoiding any D->R rounding error). If there is an angle mode setting, it would only affect which set of trig functions the keys map to.

How is that different from buying a "normal" calculator and always keeping it in RAD mode? Just ignore the other modes and you'd have what you want, right?

In RPL machines you can easily make new commands, such as SIND, ASIND, etc. which changes mode and then does your operation, etc.


RE: The case of the disappearing angle units, or "the dangle of the angle" - StephenG1CMZ - 08-06-2019 08:16 AM

The key difference is that ignoring the other mode is not so easy.

Decided to use degrees once?
Lent the calculator to a friend?
Pressed a random button as you picked it up?

Use it again next week - your calculation is wrong.
Debug it - your SIN is wrong.
Oh yes, I need to remember to keep resetting the calculator.
Where's the mode switch I hardly ever use?

Much easier to call SINR or SIND assuming you have a programmable or they are both predefined and know they will both work, without needing any mode. Except you then need 3 extra keys on the keypad.


RE: The case of the disappearing angle units, or "the dangle of the angle" - Claudio L. - 08-07-2019 09:26 PM

(08-05-2019 06:49 PM)ijabbott Wrote:  I'd quite like a calculator where the standard trig functions only worked in radians, at least for writing programs. You could then have some non-standard trig functions such as SIND/ASIND for angles in degrees, etc., as well as functions for converting between angle units (so SIND would be more or less equivalent to D->R SIN, perhaps avoiding any D->R rounding error). If there is an angle mode setting, it would only affect which set of trig functions the keys map to.

I considered going that route. There were a few annoyances:

a) The key definition changes when you change the mode, so when you are typing a program in the command line and press S, you get SIN, SIND, or SING depending on the current mode. It can get annoying if this is not what you intend.

b) From the user's perspective, if you type 90 and press S (assuming S key = SIN), you'd still need to check if the machine is in degrees, so there's no real difference from that point of view because you get a result without ever seeing if the key was actually mapped to SIN, SIND, etc.

c) For symbolic manipulation, you'd need to handle simplification of expressions separately for each of the 3 commands. This is not a bad thing per se, but it triples the number of rules dealing with trig, which triples the time it takes to process them all.

There's some good things: The derivative becomes crystal clear: the derivative of SIND(X) is pi/180*COSD(X)*derivative(X) and end of discussion. On the other system, the derivative of SIN(X) with X accepting any angular system will be COS(X)*derivative(X), which is correct or not depending on the point of view. If X is an angle object, then it's correct because X in any system represents the same angle, but if you plot the derivative vs. X in degrees then the magnitude of the slope is off.


RE: The case of the disappearing angle units, or "the dangle of the angle" - Claudio L. - 08-07-2019 09:38 PM

(08-06-2019 08:16 AM)StephenG1CMZ Wrote:  The key difference is that ignoring the other mode is not so easy.

Decided to use degrees once?
Lent the calculator to a friend?
Pressed a random button as you picked it up?

Use it again next week - your calculation is wrong.
Debug it - your SIN is wrong.
Oh yes, I need to remember to keep resetting the calculator.
Where's the mode switch I hardly ever use?

Much easier to call SINR or SIND assuming you have a programmable or they are both predefined and know they will both work, without needing any mode. Except you then need 3 extra keys on the keypad.

Well... if you take the trouble of doing what Bob suggested, then you could put a STARTUP program that forces the machine to RAD mode every time you warmstart, and another one that does it when you turn it OFF. Then you have fully implemented ijabbott's idea with no drawbacks.


RE: The case of the disappearing angle units, or "the dangle of the angle" - ijabbott - 08-07-2019 11:45 PM

(08-06-2019 02:24 AM)rprosperi Wrote:  In RPL machines you can easily make new commands, such as SIND, ASIND, etc. which changes mode and then does your operation, etc.

That's fine unless you interrupt execution at precisely the wrong moment!


RE: The case of the disappearing angle units, or "the dangle of the angle" - rprosperi - 08-08-2019 12:09 AM

(08-07-2019 11:45 PM)ijabbott Wrote:  
(08-06-2019 02:24 AM)rprosperi Wrote:  In RPL machines you can easily make new commands, such as SIND, ASIND, etc. which changes mode and then does your operation, etc.

That's fine unless you interrupt execution at precisely the wrong moment!

Wow, you'd have to be really quick to halt it inside the new function, LOL. I get your point, but since it's unlikely such a model will be released soon, hopefully suggestions like these will give you some ideas/options to modify your machine into something nearly as good.


RE: The case of the disappearing angle units, or "the dangle of the angle" - jlind - 08-13-2019 01:56 AM

(07-31-2019 07:34 PM)ijabbott Wrote:  I know angles are technically dimensionless, but lots of people like to give them units nonetheless. This leads to situations where the units magically disappear or reappear unless extra steps are taken.

Consider the following examples (images shamelessly borrowed from mathsisfun.com)...

Area of a sector of a circle

[Image: circle-sector-area.svg]

\(A=\theta \cdot \frac{r^2}{2} \)

(for \(\theta\) in radians). To make the math work when angles have units, the above expression for area technically needs to be divided by 1 radian:

\(A=\frac{\theta}{1\,\textrm{rad}} \cdot \frac{r^2}{2} \)

Area of a segment of a circle

[Image: circle-segment-area.svg]

\(A=(\theta - \sin{\theta})\cdot\frac{r^2}{2}\)

That's different - we have an angle (in radians) minus its sine. To make that work, we need to divide the plain angle by 1 radian:

\(A=(\frac{\theta}{1\,\textrm{rad}}-\sin{\theta})\cdot\frac{r^2}{2}\)

Arc length of a sector of a circle

[Image: circle-arc-length.svg]

\(L = \theta \cdot r\)

Again, we need to divide the angle by 1 radian to get rid of the angular units:

\(L = \frac{\theta}{1\,\textrm{rad}} \cdot r \)

Question

Is it better to ignore angular units and just treat angles as plain old numbers (as long as an angle of 1 corresponds to 1 radian), or does the angular aspect have some cosmic significance that shouldn't be casually discarded? I guess this is more of a philosophical question, inspired by the way the WP-43S project plans to handle angles.

ijabbot:

You are confusing dimensionless with unitless and equating them. They're not the same. A plane angle, which is dimensionless, is a scalar value with a unit to reflect a quantity, be it radians, degrees, grads, quadrants, sextants, turns, or some other unit of measure. Dimensionless and unitless are two very different things. There are an enormous number of dimensionless scalars with units of measure. The SI unit for a plane angle is the rad, the abbreviation for Radian. The unit for a solid angle is the sr, the abbreviation for Steradian.

Please see this discussion in Wikipedia regarding dimensions and units:
https://en.wikipedia.org/wiki/Physical_quantity#Units_and_dimensions

John


RE: The case of the disappearing angle units, or "the dangle of the angle" - ijabbott - 08-13-2019 07:28 AM

(08-13-2019 01:56 AM)jlind Wrote:  You are confusing dimensionless with unitless and equating them. They're not the same. A plane angle, which is dimensionless, is a scalar value with a unit to reflect a quantity, be it radians, degrees, grads, quadrants, sextants, turns, or some other unit of measure. Dimensionless and unitless are two very different things. There are an enormous number of dimensionless scalars with units of measure. The SI unit for a plane angle is the rad, the abbreviation for Radian. The unit for a solid angle is the sr, the abbreviation for Steradian.

But is the distinction important mathematically or only for engineering purposes? From what I can gather, mathematicians (or at least pure mathematicians) tend to think of the trig functions as purely numeric functions, without units. For example, "trig substitution" may be used to make certain integrals more tractable.


RE: The case of the disappearing angle units, or "the dangle of the angle" - jlind - 08-14-2019 04:53 AM

(08-13-2019 07:28 AM)ijabbott Wrote:  
(08-13-2019 01:56 AM)jlind Wrote:  You are confusing dimensionless with unitless and equating them. They're not the same. A plane angle, which is dimensionless, is a scalar value with a unit to reflect a quantity, be it radians, degrees, grads, quadrants, sextants, turns, or some other unit of measure. Dimensionless and unitless are two very different things. There are an enormous number of dimensionless scalars with units of measure. The SI unit for a plane angle is the rad, the abbreviation for Radian. The unit for a solid angle is the sr, the abbreviation for Steradian.

But is the distinction important mathematically or only for engineering purposes? From what I can gather, mathematicians (or at least pure mathematicians) tend to think of the trig functions as purely numeric functions, without units. For example, "trig substitution" may be used to make certain integrals more tractable.

ijabbott,

An "applied" mathematician would also like to be thought of as "pure" versus "impure" although a "theoretical" one might think his "applied" brethren have allowed themselves and their abstractions to become contaminated by the concrete world around them. ;-) It's semantics nit picking, but as a Physicist and Engineer, I am by necessity also an applied mathematician. Forgive me. I couldn't help myself, but freely admit having committed the Faustian act of selling my soul using the theoretical in practical applications. :-D I'm not devoid of the philosophical though as I'm a Formalist, not a Platonist (I'll let you look those up).

From a standpoint of deriving various trig identities, such as sin^2(theta) + cos^2(theta) = 1, or in dealing with theorems, the angle variable is always there and it's implicit that its units are consistent throughout (i.e. the angles are all in Radians, Grads or Sextants, etc.). The units used are arbitrary, but they're still there. It's implicit in the Pythagorean Theorem for a plane geometry right triangle, "c^2 = (a^2 + b^2)^0.5", (the solid geometry version: d^2 = (a^2 + b^2 + c^2)^0.5) that range and domain variable units are consistent (all in fermi, furlongs, rods, bohr, leagues, cubits, etc.). Otherwise they would be polluted with conversion factors, such as 0.9 deg/grad, or 1000 am/fm. Likewise with Einstein's equivalence of matter and energy, E = mc^2. If S.I. (aka mks) is used, "m" is in kilograms, "c" is in meters/sec and E is in Joules (Newton-meter, or kg m^2/s^2). In "cgs", E is in ergs, m is in grams and c is in cm/sec (g cm^2/s^2), 1 erg = 10^-7 J. In Newtonian Mechanics (i.e. before Einstein's Relativity modified it), Newtons Law of Universal Gravitation (for two bodies) is often expressed as
F = G * (m1 * m2 / r^2)
where G is the Universal Gravitational Constant, F is the mutual force, and m1 & m2 are the masses of the respective bodies, and r is the distance between their respective centers of mass. No units are given in physics texts, but you'd best be consistent regarding mass and length, and for the Gravitational Constant G (it has units and its value is units dependent), and what that means for the resulting units you get for the mutual Force. Not too bad if you're dealing with mks vs cgs as it shuffles the decimal point a few places, but it was a mess when some of us had to deal with it in FPS (Feet, Pounds and Seconds with someone always giving "r" in miles; see remarks below).

Theoretical mathematicians and physicists like to deal in general cases using range and domain variables independent of units. Doesn't mean they're unitless. It's implicit in practical application that units will either be consistent or conversion factors employed. It makes them cleaner looking for clarity of the relationships. Trig identities are often written without the "theta" but it's implicit.

If you want a real joy, start using common "English" aka "US Engineering" fps (foot, pound, second) units related to force, mass and energy, using Pounds, Poundals and Slugs for mass and force. Don't even try to use the former British Engineering System which lacked coherence and contained ambiguity regarding what a "pound" is (force or mass ?) that could only be hopefully resolved by usage context (not the monetary version of the Pound Sterling). Had several years of that to contend with in school. Gave the scalar values for some velocities once in Furlongs/Fortnight and Leagues/Lustra out of sheer frustration, as the units for the answer were not specified. Gave an area answer one other time in Barns (and there's a smaller one related to it called a Shed) versus square feet. Ever so glad when metric and S.I. supplanted English units in most engineering (Civil, Construction and Architectural in the US must still deal with English units).

Hoping this has been at least partially entertaining.

John


RE: The case of the disappearing angle units, or "the dangle of the angle" - ijabbott - 08-14-2019 03:29 PM

The sin, cos, and exp functions all have similar-looking power series expansions (except that sin and cos expansions miss every other term of exp and alternate the signs of the remaining terms), so what is special about sin and cos that requires the input to have dimensionless units, but not exp?