add c code for get wexp cutoff (for powersam)