mul_by_scal: works for int, testing for double