The logic of activation functions