fast-expt and fast-mult