use shift instead of floating point multiplication