Live data from Hacker News

Turns are better than radians

computerenhance.com

121–130 of 494 posts

Re: Turns are better than radians

#121
In my view, because pi crops up unavoidably in math, if you concoct a "unit" to get rid of pi in one place, it will simply crop up somewhere else, perhaps in a denominator.

For instance: The ratio of rise to run for small angles.

Working in optics, radians are such nice units: A milliradian is a millimeter per meter or a "mil" per inch.

Re: Turns are better than radians

#122
post #13

I agree that this makes sense for the kind of situations that the article talks about. If you only need to express common angles like 90 degrees, 45 and so on, radians are just messy (though in physics, you get used to it). But in other cases, radians are useful. For example consider the case of small deviations from a direction. If you give it in radians, let's say three mrad (milliradians), it's very easy to estima…

To elaborate a bit: that works because sin(x) is very close to x for small x, but only when x is measured in radians.

Re: Turns are better than radians

#123
post #86

Earlier quoted context omitted.

That is the way to do the math, but not the way to write the code. That said, I would like for my compiler to combine any multiplications involved down to one factor for input to the fastest sin/cos operations the machine has. And , to treat resulting multipliers close enough to 1, 1/2, and 1/4 as exact, and then skip the multiplication entirely. But the second part is a hard thing to ask of a compiler.

Yeah, seems to me that languages should allow way more semantic expression than most do today. I wish I had done CS, those kinds of compiler optimization sounds so fun. I'd love to work on that

Good news, optimization is engineering, not CS. CS is all about what a program would eventually do, if you were ever to run it. Once you run it, you have moved to the domain of technicians. Engineering is about making it run better.

Re: Turns are better than radians

#124

Earlier quoted context omitted.

Why do they need to be at multiple integers of pi, instead of at half turns?

The main thing to realise is that sin and cos are not fundamentally tools for doing geometry. The fact that you can use them for working out side lengths of triangles or converting polar to cartesian coordinates is somewhat incidental. It doesn't help that at school our first look at sin and cos is all about adjacent sides and opposite sides in right-angled triangles. It's understandable, because jumping straight int…

A turn doesn't have to represent an angle. It can also be a "cycle" in the oscillation.

I studied engineering, and pretty much everywhere where we needed the radian form with Pi, the mental reasoning was "one cycle, or repetition, or loop ot whatever is Pi". Never did Pi have any deeper meaning that helped understand the logic of the problem.

Re: Turns are better than radians

#125

Earlier quoted context omitted.

Just out of curiosity, where did tau come from? I never heard of it used for 2pi, and frankly, it seems like a poor choice because in engineering it is one of the most common symbols used (time constant tau).

https://tauday.com/ is a good entrance to this particular rabbit-hole.

Doesn’t Tau (the letter) look like half of Pi? Isn’t this a lost cause already?

Re: Turns are better than radians

#126

>But math never decreed that sine and cosine have to take radian arguments! To define trigonometric functions you need angles. Which can be measured in degrees or radians. If angles, degrees or radians wouldn't matter, those functions would be some ordinary real functions and not called "trigonometric". https://www.math.net/sine

Which can be measured in degrees, radians, or, as the article recommends, turns.

Re: Turns are better than radians

#127
post #106

Earlier quoted context omitted.

Right, radians are the "natural" units of angle, others generally just make a circle into some integral number of units for convenience, but you always have to go back to radians to actually do calculation. In the next installment, maybe he'll propose that turns can be limiting because diving up a circle requires the use of fractions, and suggest instead of 1 turn per circle, we make a number that's easily divisible…

> you always have to go back to radians to actually do calculation. The article actually argues the opposite: that the common implementations of sine and cosine start by converting their radian based arguments to turns or halfturns by dividing by pi.

That's just because the power series would take ages to converge for large arguments, so you take advantage of periodicity. But the implementation in a floating point world is a different thing than the definition in an infinite series world.

For example, e^x can be implemented by handling the integer and fractional parts separately, for similar reasons. But no one really cares about the functions e^floor(y) and e^(y-floor(y)). They are only useful as part of an implementation trick.

Re: Turns are better than radians

#128

y’’ = -y Radians are God’s chosen angular unit. If you want to do mathematics, you have to use radians.

video games don't usually need to take unitless derivatives of sines.

True, but if you are talking about video games in particular you could just build a sin/cos function with different parameters into the game engine.

have a `sin(x)` where the unit of x is radiants and a `sin_turn(x)` where x is expressed in turns.

Video games especially are a great situation to do it like this because they often use a framework (game engine) that was specifically created for this purpose.

Re: Turns are better than radians

#129

Earlier quoted context omitted.

The writer don’t seem to realise that radian is not an arbitrary unit but a dimensionless one which is defined so that 1rad is actually just 1. Reading the submission and the comments here, I’m under the impression that trigonometry is not extensively taught in middle schools and high schools in the USA. While I’m slightly envious you might not have to suffer developing powers of cosine and sine but that would explai…

I was a bad student through 8th grade, but managed to get selected for a STEM magnet school. I was supposed to enter 9th grade with Geometry, then algebra II, trig, Calc for the 4 years. But they discovered i'd never passed algebra prior, they put me in algebra, which means i would have finished in trig. Due to a crazy 3.5 years, i never got a high school math education. Calculus makes my eyes glaze over, and all i k…

Calculus made a lot of it “click” for me but I somehow got through high school and college without ever doing or understanding trigonometry.

Re: Turns are better than radians

#130

Earlier quoted context omitted.

Whats wrong with long variable names?

Try to solve the Schrodinger Equation for even an infinite well using long variable names. I'm not talking about using it in code, I'm talking about someone arguing that books and articles should do it as well.

If you go watch math lectures, there's a bunch of "x means Puppy Constant" or, "let's substitute in k for the Real component", or "let's signify by collecting these terms into a variable". My argument wouldn't be to replace ALL the variables with meaningful names, just the ones with a lot of meaning that a reader might not understand. It'd also be great if constants, variables, and functions all got naming conventions. Lowercase letters are variables, all caps for constants, etc. It saves a little bit on writing to shorten the variable names, but if the goal of math is to share and spread knowledge within the community or without, better naming and less-memorization would both help. You can also rename things for the working out and use friendlier names for the final equations, just tell people how you're renaming them and everyone will follow along and the programmers will stop trying to sell you one readable code.

Most importantly the flat dismissal and horror that many express when someone brings up adjusting the symbolic traditions of Maths should be investigated. Engage with why you feel so strongly that anything other than rigid adherence to tradition is sacrilege. Based on what I've heard, in order to be a great Mathematician, you need to hold onto tradition lightly and think outside the box. Rigid adherence to tradition doesn't sound like that to me.

Post reply on HN