compute q-exp-str