No, you need to go up to 32 bits. In general, a product of two 16-bit numbers will always give you a 32-bit result.
You should check the instruction set of the processor of the processor you are running on, because most of the multiplied instructions on 16-bit machines have the ability to return the result as a 32-bit integer.
This will help you because:
short testfunction (short a, short b)
{
int A32 = a;
int B32 = b;
return A32*B32/1000
}
32- * 32- . 16- .
.
Texas Instruments C64x + DSP, :
short test (short a, short b)
{
int product = _mpy (a,b);
return product / 1000;
}
: 1000. ? . 1024 . :
return (a*b)/1024
? , 10 . , .