Live data from Hacker News

Turns are Better than Radians (2022)

computerenhance.com

111–120 of 225 posts

Re: Turns are Better than Radians (2022)

#111
post #67

Even better : did you know (-1)^x draws the unit circle in the complex plane ? No need for complex exp and i*pi

You do in fact need the complex exponential to define this correctly because the function a^x for nonintegers x is only unambiguously defined when a is a positive real number. For example, your function could be either e^(pi i x) or e^(-pi i x), which trace the circle in opposite directions as x varies over the reals. (They happen to agree when x is an integer.)

I agree. I just meant the 2D function cos(pix),sin(pix) is quite natural to work with and it can be reflected easily in the formulation of (-1)^x

Re: Turns are Better than Radians (2022)

#112
post #69
post #67

Even better : did you know (-1)^x draws the unit circle in the complex plane ? No need for complex exp and i*pi

That's because a^b = exp (b ln a) That's equivalent to saying, no need for -1 because we have exp. One can change based of the exponentiation operation. Exp happens to be a convenient base.

Yeah bad formulation on my part

Re: Turns are Better than Radians (2022)

#113
post #69

Earlier quoted context omitted.

That's because a^b = exp (b ln a) That's equivalent to saying, no need for -1 because we have exp. One can change based of the exponentiation operation. Exp happens to be a convenient base.

Yeah bad formulation on my part

Not bad at all, just equivalent.

Re: Turns are Better than Radians (2022)

#114

Wait until you discover gradians: centesimal system applied to angles. A turn is 400 gradians, right angles are 100 gradians. Same advantages as here but multiplied times 400...

You could even pick a highly compound number like 2^3*3^2*5 then you could divide it neatly into whole numbers for lots of divisors!

Re: Turns are Better than Radians (2022)

#115

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 fo…

It 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.

Re: Turns are Better than Radians (2022)

#117

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 fo…

The 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.

Re: Turns are Better than Radians (2022)

#118

Here's another good reason to think in turns: it turns Euler's formula from this Eldritch Terror: e^(i*x) = cos(x) + i*sin(x) into something you can kinda understand by staring at the complex plane: -1^(2x) = cost(x) + i*sint(x) Credit to justinpombrio for this: https://news.ycombinator.com/item?id=32986869

Funny how the so-called eldritch terror is another face of what is widely considered one of the most beautiful equations in mathematics, Euler's identity that unites five fundamental constants.

  e^(i*pi)+1 = 0
..which is a result of the more general formula.

  e^(i*x) = cos(x) + i*sin(x)
Pi is hiding there in the sin and cos functions implicitly, because the unit radian is defined by 2*pi. In comparison, the version you mentioned that takes x in "turns".

  -1^(2x) = cost(x) + i*sint(x)
It got rid of pi and e, which already seems a win for simplicity. i is still there for the imaginary component, or y in the complex plane. So the need for pi was removed thanks to the "turn", defined by 1 as the whole circle or cycle.

Multiplying -1 to itself every half turn makes it an alternating series of 1 and -1.. Weird, but it is visually clear to understand, without involving e. Though I still don't see where e went. Oh, this comment explains:

> If we rearrange the products in the exponent we get

    2πix          πi2x          (  πi ) 2x
  e         ->   e         ->   (e    )
> Where e^(πi) is -1. That shows there is something to the turns units; we can express the analog of the Euler identity using exponentiation using a base and factor which are integers.

Yeah I get it now, a "turn" acts like a dimensionless unit to the circle/cycle.

Re: Turns are Better than Radians (2022)

#119
post #110

Earlier quoted context omitted.

That'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 Giacomo Prando summarizes the troubled history of the radian, a unit with the odd property of appearing and disappearing seemingly…

Ensuring units agree is indeed a form of type checking. A more thorough procedure for the former is dimensional analysis. I think the fact that action and angular momentum have the same units played an illuminating role in making sense in Bohr's model regarding why only certain orbits are allowed. Not sure how that would play out once angle is considered a fundamental entity. This sure is a rabbit hole. Thanks for yo…

In another comment I made in this thread https://news.ycombinator.com/item?id=49373317 I think it came to the understanding that a "turn" is similar to a dimensionless quantity, as it takes the full circle/cycle as a fundamental 1. Apparently, using the turn as a unit allows one to get rid of pi and e in Euler's formula in favor of 1 and -1.

Re: Turns are Better than Radians (2022)

#120

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 fo…

> 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

Post reply on HN