Getting ready to do the forward algorithm in log space