4 ms·
I like to store angles as turns in my own code, because (as noted) it makes quarter-turns computable without rounding. OTOH if you need, say, twelfths of a turn
by mayoff 2mo ago
I like to store angles as turns in my own code, because (as noted) it makes quarter-turns computable without rounding. OTOH if you need, say, twelfths of a turn, you might want to just store angles as degrees since that’s already common.
Michael Spivak, in Calculus (3rd ed p. 301) considers the unit choice to be a property of the function and initially defines sin° and sinʳ (before settling on sin meaning sinʳ) and considers “sin x°” and “sin x radians” to be misleading, saying that ‘a number x is simply a number—it does not carry a banner indicating that it is “in degrees” or “in radians”’. I don’t really understand this argument, since in science and engineering we constantly carry units around with our quantities.
- math-man 2mo agoIt's because both radians and degrees are are a ratio of a length to another length and are thus dimensionless. No matter how you measure it, all angles are without a unit. It's most obvious with radians but it's also the case with degrees. Using radians, you are guaranteed to not introduce unusual extra terms to rescale angles, if you use any other scale of angle you will have to keep track of extra terms. That may be useful in whatever you're doing. I work in degrees quite often and I'm careful to keep track of the 2pi/360 terms that crop up all over the place. With grade measure you have to keep track of 2pi/400 terms and with turns you have to keep track of 2pi/1 terms that will repeatedly show up. Again, depending on what you're doing, this may or may not make sense to do. In general, mathematics works out easier when the scaling term is 2pi/2pi because then you have a lovely 1 scale factor you don't have to keep track of.
- eru 2mo agoAgreed. Though sometimes it's useful to keep track of 'fake' units like for angles, to make something like dimensional analysis work for you. But that's more for analysis of your code / formulas than when you actually go and compute things.
- dahart 2mo ago> all angles are without a unit. Dimensionless, sure, but what do you mean here? Radians and degrees are units, are they not?
- thyristan 2mo agoIn a very awkward way: rad is m/m, which is 1...
- ant6n 2mo agoPerhaps in the physics sense, but in computer science we do have the notion of types which does allow us to model the difference between an angle and other numerics.
- aidenn0 2mo agoIt is only equal to 1 by convention. If we instead considered the ratio of the diameter to the arc-length then rad would be 1/2.
- simiones 2mo agoDimensions and units are separate things, though. For example, 1 minute and 1 second are different units of the same time dimension. Similarly, 1 rad and 1 degree are both dimensionless, but they are both different units.
- thyristan 2mo agoTheoretically, you can define systems of measurement where a lot of seemingly separate things fall on the same units and dimensions. There are "natural units" in physics where you take the fundamental nature of particles and relativity into account and make some convenient choices for some physical constants such as the speed of light c := 1. Then the speed becomes dimensionless, length and time have the same unit and dimension (a length of 1eV is a time period of 1eV), and almost all units are simply derived from a measurement of energy (electron volt, not as basic as people would like, but useful enough). https://en.wikipedia.org/wiki/Natural_units https://en.wikipedia.org/wiki/Natural_units
- srean 2mo agoIt is dimensionless by fiat and convention. It clearly has units such as degrees, grad and radians. Just like other quantities that have units, a specific measurement is expressed as a pure numerical multiple of an unit which may be radians, degrees etc. This is a known wrinkle in dimensional analysis and people have considered making angles a fundamental quantity such as mass, length and time but have not done so because of the disruption it would cause. More details here https://en.wikipedia.org/wiki/Radian#Dimensional_analysis https://en.wikipedia.org/wiki/Radian#Dimensional_analysis https://en.wikipedia.org/wiki/Angle#Dimensional_analysis https://en.wikipedia.org/wiki/Angle#Dimensional_analysis
- lioeters 2mo agoThat's my rabbit hole of the week. > The current state of affairs leads inevitably to ghostly appearances and disappearances of the radian in the dimensional analysis of physical equations. In "A spectral unit", Nature Physics (2020) - https://www.nature.com/articles/s41567-020-0997-3.pdf https://www.nature.com/articles/s41567-020-0997-3.pdf Giacomo Prando summarizes the troubled history of the radian, a unit with the odd property of appearing and disappearing seemingly at will in dimensional formulas It led me to reading about "dimensionless quantity". > There have been periodic proposals to "patch" the SI system to reduce confusion regarding physical dimensions. For example, a 2017 op-ed in Nature argued for formalizing the radian as a physical unit. SI units need reform to avoid confusion (2017) - https://doi.org/10.1038%2F548135b https://doi.org/10.1038%2F548135b > The idea was rebutted on the grounds that such a change would raise inconsistencies for both established dimensionless groups, like the Strouhal number, and for mathematically distinct entities that happen to have the same units, like torque (a vector product) versus energy (a scalar product). Don't tamper with SI-unit consistency (2017) - https://doi.org/10.1038%2F549160d https://doi.org/10.1038%2F549160d --- What's surprising is that these discussions are so recent, considering the wide implications on so much practical work in mechanics and engineering. Maybe people got so used to working around the question, that any proposed solution would be too disruptive - so it's better to keep things backward compatible rather than conceptually simple/clear and explicit. In another comment someone said, "types" (in programming and type theory, I'd guess) are a poor model of physics units. But I wonder about that, it seems "units" are something like types with associated quantities, like degrees with 360, or meters with the speed of light. This line of inquiry also led me to "dimensionless physical constants". https://en.wikipedia.org/wiki/Dimensionless_physical_constant https://en.wikipedia.org/wiki/Dimensionless_physical_constan... Certainly pi (and e) must be one of those fundamental constants regardless of any unit of measurement. A "turn", on the other hand - well, if we consider 1 as a dimensionless constant that means a "whole".. How Many Fundamental Constants Are There? (2011) John Baez https://math.ucr.edu/home/baez/constants.html https://math.ucr.edu/home/baez/constants.html
- srean 1mo agoYou might find the following interesting. It is about trigonometry as practiced by early Indian mathematicians. Rather than using an unit circle they used a circle of 3438 units. https://news.ycombinator.com/item?id=45129081 https://news.ycombinator.com/item?id=45129081 Now it is customary to standardized on the radius. Early Indian astronomers and mathematicians standardize on the arc length of a minute.
- jameshart 2mo agoYou generally can’t apply functions to dimensional units. The only thing units can do is be multiplied or divided together. So I can multiply a mass by a distance or divide a distance by a speed, and I can multiply the result by a scalar; but I can’t take the sine of a distance or the logarithm of a time or exponentiate a mass. Those are things I can only do to scalars. ‘But wait!’ You may cry: ‘the formula for a transverse wave varies with the sine of a distance!’ To which I would say no: it varies with the sine of a distance (the horizontal displacement), divided by another distance (the wavelength), divided by 2pi. The distances cancel out and leave a scalar. The sine is taken of that pure scalar; it results in a pure scalar; and then it’s multiplied by another distance (the amplitude) to give you a vertical displacement. Sine is a pure function. Something else to consider is that the way we combine units with scalars to create dimensional quantities is through multiplication - and it’s not like there’s a simple formula for what a sine of a product is - I can’t determine sin(ab) in terms of sines or other functions of a and b. So if, say, a ‘degree’ were some dimensional unit, sin(90°) would not be something I could calculate - despite knowing sin(90) I don’t know sin(°) - whatever that would mean - and even if I did it gets me no closer to figuring out sin(90°) Realizing that ° is just a mathematical constant equal to pi/180 solves a lot here.
- cozzyd 2mo agoWell you can also square root etc.
- hasley 2mo agoI basically agree, at least for standard functions like sin, cos, tan, exp etc. It is even possible to see mistakes in equations just by checking that all the units to standard functions cancel out making the arguments dimensionless. On the other hand I am still unhappy with calling the ratio of two quantities, that happen to have the same units, "dimensionless". This way, you could create any two "dimensionless" quantities and try to compare them or use one in place of the other which might be meaningless.
- cubefox 2mo agoYeah, "dimensionless" would mean they have equal dimension, which would mean they are comparable, which isn't necessarily the case. E.g. both radians and degrees are called "dimensionless". Edit: Apparently "same dimension" doesn't imply "same unit".
- Timwi 1mo agoI don't think of it as units (as the sibling comment pointed out, angles are dimensionless); I think of ° as a postfix unary operator that does the conversion. In other words, I read sin(x°) as a shorthand for sin(x*Pi/180).