Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’ve been writing code for 46 years. Not once have I had to code a derivative.

And for all the people who are concerned about how sin' 2πx = 2π cos 2πx, in actual code, it doesn’t matter. Let’s say that I’m writing a basic graphing function and I want to be able to display the slope of the sin curve at any point.

I am not going to expose the turn-based units to the user. Caring about slopes implies that I’m doing calculus and thus assuming radians. So even though my internal values are [0,1], I will label them as [0, 2π] (and the actual numeric values on the display may actually be something like [50,450] which is yet another numeric value we don’t display). So to get the slope at π/4, I’ll calculate cos_t 0.125 and display that value.

We do all kinds of unit translations in computing without worrying about it. This is just another case of that which observes that numerically speaking, using turns is better aligned with the underlying numerical algorithm for calculating trig values.



> I’ve been writing code for 46 years. Not once have I had to code a derivative.

Haha !

I have been coding for much shorter time but having done some ML on orientations and on spheres in my time, I have had to take their derivatives all the time.

It will be interesting to consider folks who do machine learning on robot trajectories or analysing dynamics of robotic arms.


> Caring about slopes implies that I’m doing calculus

You could be using the results of calculus, which became frazzled with gratuitous constants because of poor angle units before anyone wrote any code.

You want to keep all the math in radians until you code the calculations; then figure out how to optimize it with turns where possible.


> I’ve been writing code for 46 years. Not once have I had to code a derivative.

It sounds like discussions about "porting from math" do not pertain to you then?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: