negative data with left shift, use cast or multiplication instead
merge the calculate
Merge pull request #294 from huili2/neg_left_shift

negative data with left shift, use cast or multiplication instead