Compute p_longer.