Live data from Hacker News

Turns are better than radians

computerenhance.com

261–270 of 494 posts

Re: Turns are better than radians

#261
post #183

Earlier quoted context omitted.

I'm a 50 yo programmer. I have a CS degree. I don't even remember my college calculus much less my high school trig. I just haven't had cause to use it in my career, not as a sysadmin, not as a programmer. My son is taking calc 3 and I knew I happened to have my calc 3 notes from the mid-90s, so I pulled them out of the filing cabinet and my very carefully taken notes, my proofs, my hand drawn graphs, it was all gibb…

I'm 27, educated in the UK, all I remember about trigonometry is SOHCAHTOA.

USA here, same acro. I still start off solving by writing it off and drawing slashes through O/H A/H O/A for reference.

Came to use trig functions quite frequently while playing video games, and that was a big surprise to me. Not to assume you've played it, but I've recently discovered that Stormworks is a programmer's game - you can write microcontroller code in LUA for your vehicle designs. And, wow, does it ever use my trig knowledge everywhere.

Realized the transponder beeps can be triangulated, tick being 1/60th of a sec and that's a distance estimate resolution of up to 5-10 km. And that's when cos and sin came back to be useful because you can do intersection of circles and figure out where to do a sea rescue more precisely. So video games, trig. Who would've thought?

Re: Turns are better than radians

#262

Earlier quoted context omitted.

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

> Engage with why you feel so strongly that anything other than rigid adherence to tradition is sacrilege

Who’s saying that? Inventing good notation is a big part of mathematics (and that also frequently gets criticized on HN because it may introduce ambiguities)

Also, there’s nothing wrong with texts that target an audience with a certain level of understanding.

It’s not as if adding, for example, “By Hermetian matrix we mean a complex square matrix that is equal to its own conjugate transpose” will make a paper much easier to understand, just as adding a comment “this is where the program starts running” doesn’t help much in understanding your average C program, or adding a definition of “monarchy” to a history paper.

In the end, any scientific paper has to be read critically, and that means making a serious effort in understanding it. A history paper, for example, may claim that Foo wrote “bar” but implied “baz”. A critical reader will have read thousands of pages, and (especially if they disagree with the claim) then think about that for a while, and may even walk to their bookshelf or the library to consult other sources before continuing reading.

Re: Turns are better than radians

#263

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…

> Am I wrong? Yes. Trigonometry is extensively taught in the US. People forget this stuff if they don’t use it. Ask some 30 year old chef in whatever country you fantasize teaches properly to compare and contrast turns vs radians and you’ll get similar responses.

Like most here, I've learned and forgotton lots of trig and calculus.

However, I still remember that "eureka!" moment of realizing that radians were special, that the small angle approximation of sin(x) = x, and many related math rules, work only when x is expressed in radians. I guess that's a credit to my math teacher, who basically led the class in deriving mathematical formulas rather than just presenting them to us.

I think the article is still valid and interesting, as "turns" in some use cases might improve performance and accuracy. But radians aren't at all "arbitrary" - if we ever encounter technologically advanced aliens, they certainly won't use degrees, but they will understand radians.

Re: Turns are better than radians

#264

Earlier quoted context omitted.

> sin(1) = 0 you are only going to confuse them. Not really, pretty much every single one would assume you just forgot the pi, because everyone writes “sin(1 pi)” and never actually “sin(3.14…)” because no one ever writes down numbers in the unit of radians, they already convert to half rotations or full rotations by scaling with pi. Imagine if someone went “nanometers are a dumb unit, because I always write down my…

In my example you would not actually write it out but instead have something like this. [sin(x) for x in sample] My point is that the trig functions are abstract and useful in multiple domains and in most of these domains turns does not make sense. Turns only makes sense in geometry and maybe some physics but most of the time in these cases you might be better off working with other units, like say quaternions. The f…

To clarify my objection is with this statement

> no one ever writes down numbers in the unit of radians, they already convert to half rotations or full rotations by scaling with pi

That statement is true only if you are talking about geometry, If you are working in any other domain the trigonometric functions operate on real numbers and have nothing to with rotations or angles and if I call sin(1) I expect to get back 0.7847 not 0

Re: Turns are better than radians

#265
post #84

Earlier quoted context omitted.

What subfield of mathematics? Surely if you do differential equations, your trigonometric functions will eat radians. But e.g. for geometry, where you do basic arithmetic operations on angles, turns are a bit more convenient than radians. (Radians are not that inconvenient if you denote 6.28 somehow, but then again, why not just use turns.)

The situation is similar to that of the logarithm and exponential functions[0]. There’s a log2 function and a log10 function and they are both useful. But when we talk about the log() function there can be no doubt that it is to base e. If you want to define a sinT() function that works in turns then that’s totally fine. But the sin() function is defined as taking an argument scaled in radians, because it is mathemat…

The sine function, defined as x-x^3/3!+... doesn't take argument scaled in radians. It takes real numbers. It has nothing to do with radians, really. Or even with angles.

The other sine function, defined using right triangles takes argument in Angles, also has nothing to do with the measuring unit.

(Also I don't know who told you that log() denotes log_e. Maybe in your narrow environment, but definitely not universal between fields and languages. Personally I prefer ln, ld and lb for natural, decimal and binary logarithms.)

Re: Turns are better than radians

#266
post #32

>But math never decreed that sine and cosine have to take radian arguments! Ummm, actually it did. The Taylor-series of sine and cosine is the simplest when they work with radians. Euler's formula (e^ix = cosx + isinx) is the simplest when working with radians. Of course you can work in other units, but you'll need to insert the appropriate scaling factors all over the place. "Turns" don't generalize to higher dimens…

>> Ummm, actually it did. The Taylor-series of sine and cosine is the simplest when they work with radians. Euler's formula (e^ix = cosx + isinx) is the simplest when working with radians. That's nice, but as the article points out most implementations of trig functions on computers don't use things like Taylor series. Another terrific use of turns is in calculating angle differences, where you take a difference and…

That's an obfuscation from the blog post. If you read further down in the code that is mentioned, the actual computation of sin is done by a polynomial expansion in x (radians), not y (turns). The purpose of y is mainly in case x is more than pi, and if so, what the corresponding angle in [0,pi/4) is.

Re: Turns are better than radians

#267
post #183

Earlier quoted context omitted.

I'm a 50 yo programmer. I have a CS degree. I don't even remember my college calculus much less my high school trig. I just haven't had cause to use it in my career, not as a sysadmin, not as a programmer. My son is taking calc 3 and I knew I happened to have my calc 3 notes from the mid-90s, so I pulled them out of the filing cabinet and my very carefully taken notes, my proofs, my hand drawn graphs, it was all gibb…

On a related note, it bothers me that there’s so much urgency to teach younger kids more and more advanced math. I use more and higher math on a day-to-day basis than practically anyone I know, but it’s very rarely even calculus, and even then it’s typically just discrete integrals or derivatives. There’s just an absolute ton of math being taught that’s going completely to waste, and it’s at the expense of the humani…

My biggest “Screw everything” moment about math was the first lecture of my numerical methods class in college when the professor said: “All that calculus you’ve been learning your whole lives? It’s useless. Carefully curated set of a few dozen problems that are doable by hand. Here’s how it’s really done for anything remotely practical”

And then we learned a bunch of algorithms that spit out approximate answers to almost anything. And a bunch of ways to verify that the algorithm doesn’t have a bug and spat out an approximately correct answer. It was amazing.

But the most long-term useful math class (beyond arithmetic and percentages) has been the semester on probabilities and the semester on stats. I don’t remember the formulae anymore, but it gave me a great “feel” for thinking about the real world. We should be teaching that earlier.

Re: Turns are better than radians

#268
post #32

>But math never decreed that sine and cosine have to take radian arguments! Ummm, actually it did. The Taylor-series of sine and cosine is the simplest when they work with radians. Euler's formula (e^ix = cosx + isinx) is the simplest when working with radians. Of course you can work in other units, but you'll need to insert the appropriate scaling factors all over the place. "Turns" don't generalize to higher dimens…

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…

> in the USA

While it might be something you are now realizing, the US is not a single entity in many ways. Rather, it's some 50 states that form a country. Each state has it's own laws and ways of doing things. While there are many similar ways of doing things, none are exactly the same. On top of that, even within the state you'll have different school systems with different policies.

And we aren't even going to discuss going to American schools in Europe.

Re: Turns are better than radians

#269
post #231

Earlier quoted context omitted.

> Am I wrong? Yes. Trigonometry is extensively taught in the US. People forget this stuff if they don’t use it. Ask some 30 year old chef in whatever country you fantasize teaches properly to compare and contrast turns vs radians and you’ll get similar responses.

It's taught extensively in the US, but what's never done is showing how terrible many of those identities or integrals are in degrees. Derivative of sin(x) is cos(x). Many people probably think this works for degrees, but it's actually some abomination like pi cos(pi x/180)/180. Of course, turns are very reasonable units sometimes for sure.

> Derivative of sin(x) is cos(x). Many people probably think this works for degrees, but it's actually some abomination like pi cos(pi x/180)/180.

That's what it would be if you are using sin in degrees and cos in radians. But if you are using degrees for both then the derivative of sin(x) is pi/180 cos(x).

Re: Turns are better than radians

#270

Earlier quoted context omitted.

I'm 27, educated in the UK, all I remember about trigonometry is SOHCAHTOA.

Ha I also remember the mnemonic but I don’t have a clue how to use it.

it's to remember the ratios for trigonometric functions on a right triangle:

Sine: Opposite over Hypotenuse

Cosine: Adjacent over Hypotenuse

Tangent: Opposite over Adjacent

Post reply on HN