_Q16shlNoSat Function

This function shifts a Q16 value by Y bits, to the left if Y is positive or to the right if Y is negative. The function sets the _Q16shlSatFlag variable in case of underflow or overflow but does not take care of saturation.

Include

<libq.h>

Prototype

_Q16 _Q16shlNoSat(_Q16 x, short y);

Arguments

x a fixed-point number in Q16 format, which ranges from -216 to 216-1. The value of this argument ranges from -2147483648 to 2147483647.
Y an integer number, which ranges from -32 to 32.

Return Value

This function returns the shifted value of x in Q16 format. The value ranges from -2147483648 to 2147483647.