6 ms·
The math is definitely not fine with turns, because your Euler formula e^ix = cos x + i sin x no longer holds. We can use a base other than e, namely B = e^2pi
by kazinator 2mo ago
The math is definitely not fine with turns, because your Euler formula e^ix = cos x + i sin x no longer holds. We can use a base other than e, namely B = e^2pi which around 535.4916. This doesn't have the nice e properties like d/dx e^x = e^x.
The elegant fact that the base of the natural logarithm, which produces an exponential function that is its own derivative, also shows up as the basis for the above Euler's formula, shows that radians are special: like what binary is to computers.
The natural logarithm being its own derivative is in fact directly linked to the derivative a radians-based sin(x) being cos(x) and so on. Make it any other unit, and you have a mess of conversion factors worse than 2pi.
Imagine complex chained derivatives, double and triple derivative, chain and product rules, all stuffed with trig functions and generating gratuitous piles of cascaded conversion constrants because radians were not used.
- ogogmad 2mo agoIn another comment, I asked why people chose to use the symbol τ over just writing turn or "rev(olution)" (defined to be the constant ≈ 6.28318530718) given how unambiguous the latter is as a name for 2π. And why not just write sinrev() or sinturn(), and leave the symbols sin() and rev (defined to be ≈ 6.28318530718) alone?
- simiones 2mo agoThe naming is irrelevant here. The point is that sin(x) ~ x for small x, whereas sinrev(x) ~ rev * x for small x, which is much uglier. And similar things happen to the derivative of sinrev() vs regular sin() and so on. So switching to preferring to express angles in revs instead actually complicates most formulas, at least in some domans.
- robertlagrant 2mo agoI think it's Tau[0]. [0] https://en.wikipedia.org/wiki/Tau_(mathematics) https://en.wikipedia.org/wiki/Tau_(mathematics)
- ogogmad 2mo agoYou either (i) don't know the Greek alphabet, or (ii) can't read people's short posts. I literally mentioned tau and why it might be a silly name (it clashes with other mathematical uses of the symbol tau). First sentence of the Wikipedia link: > The number τ (spelled as tau)
- robertlagrant 2mo agoYour short post in full: > In another comment, I asked why people chose to use the symbol τ over just writing turn or "rev(olution)" (defined to be the constant ≈ 6.28318530718) given how unambiguous the latter is as a name for 2π. And why not just write sinrev() or sinturn(), and leave the symbols sin() and rev (defined to be ≈ 6.28318530718) alone? You were asking why they used the symbol τ rather than the words "rev" or "turn". You didn't give a clue that you knew any of the rest, including what the symbol meant.
- smallstepforman 2mo agoFor graphics rendering Euler equation doesnt matter. Colours are 0.0-1.0 and have no relation to reality, but it works. Same with rotations (if we’re not using Quaternikns)
- wyager 2mo ago> For graphics rendering Euler equation doesnt matter. Huh?? "Euler angles" are one of the most popular representations in computer graphics! The only other good alternative is quaternions, where as you say this also matters!
- ErroneousBosh 2mo agoYes, but do you really need to scale all your values to make the rotation amount fit into a sin() call, only to have to scale them back again when you're done? I think what they're getting at is "why are we scaling everything so one full turn is sin(6.28ish) when we can just say sin(1)?" You could easily try it out by defining a function that replaces sin(), cos(), and tan() with their "turn" equivalents, and seeing how you get on.
- tempfile 2mo agoEuler angles have nothing to do with e^ix = cos x + i sin x. They are a completely different concept.
- x2rj 2mo agoAlso with radians the differential equation x''''(t)=x(t) has {exp(t), exp(-t), sin(t), cos(t)} as the (real) canonical base for its solution space. And x''(t)=-x(t) gets {sin(t), cos(t)} where they even result from the simplest possible (non-trivial) initial conditions (x(0)=0,x'(0)=1 and x(0)=1,x'(0)=0). If you look at all the simplest differential equations you can think of, the sin(t)/cos(t) functions in radians are almost inevitable independent from their geometric usage.
- walrus01 2mo agoI can only imagine what a ridiculous problem it would be to try to re-do, for example, the Vincenty formula for distance between two latitude/longitude points on an oblate spheroid (the earth) if it couldn't use radians. https://en.wikipedia.org/wiki/Vincenty%27s_formulae https://en.wikipedia.org/wiki/Vincenty%27s_formulae https://www.johndcook.com/blog/2018/11/24/spheroid-distance/ https://www.johndcook.com/blog/2018/11/24/spheroid-distance/ Further, inverse vincenty is pretty much an essential in anything that needs to find the azimuth between two points on a map. Such as for microwave radio link planning purposes. Karney (2013) is also radian dependent. https://github.com/pbrod/karney https://github.com/pbrod/karney
- ErroneousBosh 2mo agoI absolutely love how full Wikipedia is of completely useless pages like the Vincenty's Formulae one, where someone has just gone "look this is what it says in my maths textbook" without any explanation. No discussion of why you'd use this over for example the Haversine function, of course, just a straight out copypasta and a demonstration of how clever someone is at the mathematical notation markup. Incidentally you'd use this instead of Haversine if you wanted to be really really accurate down to millimetres across a long baseline, as opposed to lots and lots of "it's ten miles that way in a straight line" very quickly and simply.
- walrus01 2mo agoIt would sure be better if it had some concrete explanations and examples why vincenty is preferred. It's also barely any more computational load on modern computers so very little reason not to use it. Haversine is strongly deprecated in even short distance applications like planning a 35 km point to point licensed band radio microwave link, because you risk having both slightly the wrong distance and the azimuth figure being off by a tenth of a degree. Vincenty in python form is quite compact. Karney by comparison is something like 1000 lines of code. And the difference is going between like a few mm precision to nanometers.
- ErroneousBosh 2mo ago
- da_chicken 2mo agoIt doesn't really change Euler's formula. It just adds a factor for x to it (or an additional term to hide inside sin and cos as functions). That's less convenient, not less true. However, I don't really see a benefit gained out of doing this to keep your theta between -1 and 1 instead of between -2pi and 2pi. Like it's not a difficult thing to estimate or convert in your head to get a close enough estimation.
- oh_my_goodness 2mo agoThe author's not talking about doing math, but about porting math into code. Counting turns is the same as counting cycles. People do that all the time. It works fine. And this math is kind of a mess. exp(x) is its own derivative but the log is not. (d/dx)log(x) = 1/x But, agreed, if you're going to do calculus, use radians.
- wyager 2mo ago> The author's not talking about doing math, but about porting math into code. If your code doesn't look like the math it's "ported" from, the odds of it being bad code go up like 100x
- bee_rider 2mo agoI tried to make my code exactly match the math it came from, but I didn’t have enough memory to store sqrt(2)
- titzer 2mo agoIf you look at the implementation of sqrt for a computer, it's usually implemented with Newton's algorithm, which is an iterative numerical method with high speed convergence. It is computationally efficient and looks approximately zero how √ looks.
- bee_rider 2mo agoRight. I was hoping to highlight that difference with a joke.
- tigen 2mo agoSometimes a person will tell a story which is untrue, with the purpose of bringing levity to a conversation. This may be termed a joke. These stories may also be used to illustrate a point. It's important to note that such cases are not always clearly signaled as being humor or untrue. It is a part of the joke's effect that the reader or listener will not at first know it is a joke, but will realize it after noticing an absurdity. A related concept is "dry humor".
- fat_cantor 2mo ago> The natural logarithm being its own derivative the derivative of ln(x) is 1/x > the derivative a radians-based sin(x) being cos(x) and so on. Make it any other unit, and you have a mess of conversion factors worse than 2pi. the derivative (with respect to x) of sin(x) is cos(x), regardless of units for x. Otherwise the chain rule wouldn't work
- wyager 2mo ago> the derivative (with respect to x) of sin(x) is cos(x), regardless of units for x. Not if you use "turn"-trigonometric functions, as the author suggests. turn-sin `t sin(x) = sin(2pi * x)` has `d/dx tsin(x) = 2pi * tcos(x)`.
- itemize123 2mo agosuch a weird thread because everyone seems to know what they are talking about but definitely seem to miss something. but basically one would be differentiating to 2pi x rather than x. and things will work out
- moralestapia 2mo agoYour argument is correct and I'm sure you're really smart and all that. However, Proportion of code where radians are used to represent rotation in 2D (i.e. turns): 99.9999% Proportion of code where radians are used to perform higher degree derivatives, symbolic computation, etc: 00.0001%
- adrian_b 2mo agoThat is true, but only due to a historical accident, which has been preserved by the inertia of the mathematical education system. The use of the trigonometric functions with arguments in radians, which are unfortunately standard in most programming languages, wastes time and introduces unnecessary rounding errors at each function evaluation. The functions with arguments in cycles perform exact argument reduction instead of approximate argument reduction, and which is also faster (omitting a multiplication with an approximate value).
- moralestapia 2mo agoThanks for agreeing with me, GPT.
- NyxWulf 2mo agoThe author didn't argue that you should never use radians, or tau. Just that for some use cases there is an alternative that is simpler using turns. Your argument can be true and his proposal can also be true, it just depends what your use case looks like.
- adrian_b 2mo agoThat formula as such has no importance at all, it is just a correspondence between different notations. What you really mean is that there are certain mathematical problems where the complex exponential function is useful and for the complex exponential it is more convenient to measure the real part in nepers and the imaginary part in radians (in order to have a simple formula for computing its derivative and its primitive). However, the problems where the complex exponential is truly useful are at least an order of magnitude less numerous than it appears from the manner in which mathematics is taught in schools, following a tradition from the 19th century, when symbolic computations done with pen and paper were more important than numeric computations. For the vast majority of practical problems, the complex exponential is not useful at all (i.e. using it introduces unnecessary complications, without providing any advantage), but a pair of other exponential functions is much more useful, because they ensure computations that are both faster and more accurate: the binary exponential 2^x, with real argument and value, and the exponential 1^x, with argument measured in cycles and a value that is a complex number of unit norm (unit modulus). Using the pair of exponentials from above, removes computations that are slow and inaccurate (for the reduction of the arguments) from each function evaluation, by moving them to the computation of derivatives or primitives, which are operations that happen much more seldom and which also can frequently be done at compile time, instead of at run time. Any algorithm that is described by using complex exponentials can be rewritten to use only 2^x and 1^x, and this normally allows various simplifications in the numeric computations. Even the formulae for Fourier transforms are simpler. The author of the TFA is perfectly right and the use of nepers and radians is a very bad habit, which is a handicap with which most people remain after being taught mathematics in schools, with antiquated methods. While in TFA the author uses the term "turn" for the unit of plane angle, the traditional name, which was used until some time after WWII, was "cycle", from which various other unit names where derived, e.g. "cycles per meter" or "cycles per second".
- elictronic 2mo agoIt’s good to know you don’t want your house powered by AC power anymore. It’s a weird take, but you do you.
- 2mo ago
- 6gvONxR4sf7o 2mo agoWhy not e^{2 pi i x} = cos x + i sin x then? We already handle e^{2 pi/360 i x} = cos x + i sin x for x in degrees just fine. It's not that euler no longer holds, it's that you just have to be clear about what units[0] you use when comparing the explicitly angular/geometric cos and sin with the numeric exponential, and then deciding on a default numeric cos and sin/a default "unit" for angles. If we want to get real interesting with it, this could also motivate an explicitly geometric "unit" aware exp operation, and depending on the defaults we use for the angular scale and the linear scale, 2 pi could be the conversion factor, making exp(2 pi i x) = cos x + i sin x actually interesting and useful and clarifying. [0] pedantically, they're not units, or at least not dimensional units, so whatever the word for dimensionless units are, as in degrees vs radians vs turns.
- kazinator 2mo agoThe problem is that angles in the complex plane are related to multiplication, which is related to exponentiation. When you multiply two complex numbers z1 and z2, their angles add: Arg(z1 z2) = Arg(z1) + Arg(z2). That carries into exponentiation: Arg(z^2) = 2 Arg(z). The exponent 2 has an interpretation as doubling the angle. In other words, e^2πix has an interpretation as working with angles. When you have that 2π in there, but not in the sin and cos expressions, you're using different angles for multiplication/exponentiation and for sin/cos. Your left side shows that you are sticking with Arg(z) being in radians! But on your right side, you have turns: the expression cos x + i sin x is literally saying that the point whose angle is x on the unit circle in the complex plane is the complex number <cos x, sin x>. But your left side essentially says that the Arg of this point: Arg(cos x + i sin x) is not x, but 2πx! When we have a point on a unit circle whose Arg is x, then if we raise e to the power of ix, we get that point. That's what the original left hand says, without the pi. You have a "trigonometric angle" and "Arg" that are separate, right in a fundamental equation.
- 6gvONxR4sf7o 2mo agoIf we add types or a geometric abstract manifold or something, the issue is that we do want cos and sin to take numbers with a scale (e.g. cos(90 degrees) vs cos pi/2 rads), but we generally don't give the same thing to e or exponentiation (no e^i(pi/2 radians) vs e^i(90 degrees). > But on your right side, you have turns: the expression cos x + i sin x is literally saying that the point whose angle is x on the unit circle in the complex plane is the complex number <cos x, sin x>. I totally agree here, and that's purely geometric, regardless of what we express x in. We can talk in terms of abstract points without specific coordinates/embeddings in R. > When you have that 2π in there, but not in the sin and cos expressions, you're using different angles for multiplication/exponentiation and for sin/cos. This part I'm not following. When we talk about a scale, any purely universal identity like Arg(z^2) = 2 Arg(z) is going to hold regardless of the scale. I agree that the Arg stuff nicely motivates interpreting it as an angle, but don't see how it says anything at all about the scale in question. Like, we get an interpretation of e^2πix as working in angles from the Arg reasoning, but we don't get a scale for those angles from it, do we? We'd only get Arg if we impose a scale on Arg itself, right? So if we take e^2πix at x=1/2 turn=1/2, we get e^πi=-1, which gets us Arg(-1)=1/2 turn=pi rads=180 degrees, and we can work from there, but I still don't see how it imposes a unique scale that we can say is still radians and thus incompatible with the RHS's scale of turns.