making sure cumsum works for all trigfuns.