News for hackers. Stuff that matters.
Re:The "Soft Maximum" function by tjic on Wednesday January 20, 2010 @04:57PM (#1065896)
The huge flaw with this article: explaining WHY I would ever want to use a soft maximum.

Yes, it "sands off the corners".

Why do I want that?

Re:The "Soft Maximum" function by flipper on Wednesday January 20, 2010 @05:04PM (#1065907)
The article was possibly aimed at engineers or mathematicians so the author thought the benefits didn't need explaining.

A soft maximum might be useful if you want a differentiable function that closely approximates the max() function. By differentiable I mean you can work out the rate of change of the function at any point. With the hard maximum, the rate of change at the hard edge is not defined. Nicer to have one function to represent the RoC and not have to worry about special cases.

Re:The "Soft Maximum" function by tjic on Thursday January 21, 2010 @11:41AM (#1067626)
Yep, I do have a CS degree, and I realized that the crisp corners are not differentiable ... but a short paragraph about that and giving a few real world examples would have strongly improved the post.
Re:The "Soft Maximum" function by gchpaco on Wednesday January 20, 2010 @05:34PM (#1065980)
As flipper points out, the problem is that the hard maximum is not differentiable; that is, the differential of max (x, y) is undefined when x == y. Most numerical approximation techniques require a smooth, differentiable function, so this is bad.

A related problem is that of bounding. Suppose I want to minimize the parameters in a set of nonlinear equations; I can numerically differentiate the equations to get the gradient and the Hamiltonian and then I can minimize that. But I may want to impose additional criteria, like x > 0. I could just say the function goes to some preposterously high number when x <= 0, but then we have this hard corner problem again. Instead if you use a continuous function like a logarithm to impose your bound, it affects the solution space minimally, makes for a solution that will not wander outside your bounds, and is differentiable.

Re:The "Soft Maximum" function by snprbob86 on Wednesday January 20, 2010 @05:29PM (#1065961)
These sorts of softened/smoothed functions are particularly useful in games and animation. I've personally used this function for animated sliding board game pieces in a 3D simulation. The piece launches from one square at full speed and then comes to a nice soft stop after some amount of time. Much more attractive.
Re:The "Soft Maximum" function by DougBTX on Wednesday January 20, 2010 @06:00PM (#1066039)
For your googling: "easing function"