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.
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…
Turns are better than radians
311–320 of 494 posts
Re: Turns are better than radians
#312Earlier 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.
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 do recall taking a "probability in CS" as an electrical engineering student -- it was pretty mind-blowing to me the extent to which the CS students did not like to talk about any continuous math. It makes sense, though, these are different specialties after all.
Re: Turns are better than radians
#313Earlier quoted context omitted.
> Only in school exercises you can solve a differential equation by expanding a sine function into a Taylor series. > In practical physics computations, the solution of differential equations requires numerical methods that do not use the Taylor series of specific functions, even if the theory used for developing the algorithms may use the Taylor series development of arbitrary functions. I'm sorry, but you have no i…
You have replied to something that I have not said. I have said that the Taylor series of arbitrary functions have various uses, but there is no benefit in knowing which are the specific Taylor expansions of the trigonometric functions, with the exception of knowing that the first term of the sine and tangent expansions when the argument is in radians is just X. Solving physics problems using the expansion of an unkn…
There are more terms in the expansion that you can use, that's the whole point of using an expansion...
> Solving physics problems using the expansion of an unknown function in the Taylor series has nothing to do with knowing which is the Taylor series of the sine function.
I hope you're aware that the sine function appears quite often in Physics problems.
Re: Turns are better than radians
#314Earlier quoted context omitted.
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.
You can if you want make a polynomial in turns. The CPU isn’t going to care one way or the other. Implementations which are accurate in terms of turns even for values close to half a turn can be useful for avoiding numerical issues that sometimes pop up because π is not exactly expressible as a floating point number. These functions usually names like sinpi, cospi, etc. It would be nice if they were provided more oft…
Re: Turns are better than radians
#315Earlier quoted context omitted.
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 a…
Re: Turns are better than radians
#316I use vectors for everything in game programming. If I want to rotate something, Unity has this: transform.rotation = Quaternion.LookRotation(directionVector); I never touch sin, cos, pi. When I see a sin function in someone's code, my first instinct is that they're doing something wrong.
The abstraction Unity provides allows you to do neat things without fully understanding the math behind it. But if you don't also learn the math, now you are limited by what those abstractions allow you to do and by the performance cost due to the fact that these abtractions can't make good use of special-case information that would be available to you if you handcrafted the operation. It is perfectly legitimate to r…
https://stackoverflow.com/a/63673261
I think this is the sort of situation that GP is referring to.
Re: Turns are better than radians
#317Earlier 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…
Re: Turns are better than radians
#318My favourite way of handling angles was always with either unsigned char or 16bit unsigned int that was treated as 1/nth of turn. Usually in these cases cos/sin tables were pre-calculated for speed, although that need went away to an extent. As long as as the calculations wrap around on the underlying system, it makes angles much easier to manage, because angle1 + angle2 = angle3 is always within 0 to 255 or 0 to 655…
Re: Turns are better than radians
#319Earlier quoted context omitted.
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…
I doubt the students would actually learn humanities in the extra time allotted if it's not used for math. I remember a distinct refusal to internalize, especially in my male peers, during "English" classes.
Re: Turns are better than radians
#320It completely eliminates misinterpretation of the value, miscalculation from [angle = angle + tau*n] as all angles are normalized, is more descriptive, and in a decent language is zero-cost.
Programmers should not be using (radians: float) in modern languages which support wrapper classes