optimize series multiplications for MIPS