←back to thread

108 points sksxihve | 1 comments | | HN request time: 0.2s | source
Show context
weinzierl ◴[] No.43714602[source]
"Now that we understand differentiation, let’s move on to programming. So far, we’ve only considered mathematical functions, but we can easily translate our perspective to programs. For simplicity, we’ll only consider pure functions, i.e. functions whose output depends solely on its parameters (no state)."

I think I've seen this notion that the constraint is pureness also in documentation of autodiff libraries, but this cannot be strong enough, right?

It easy enough to come up with functions that are nowhere differentiable. So my question is, what are the actual requirements a state of the art autodiff library has for the input function and why do people focus on the pureness aspect if that is probably the least of the problems.

replies(3): >>43714671 #>>43716612 #>>43717272 #
1. grandempire ◴[] No.43716612[source]
State is just values which are not considered to be variable function inputs - in other words each time you change state you have new functions.

For example f(x, y) = xy and then defining a differentiable function g(x) = f(x, a). You can imagine “a” being a state variable.