implementation of mul_int_by_int and mul_big_int_by_int