06-07-2006, 01:30 PM
Code:
(int16_t)(s32a * s32b) /*Compliant */
This example is found on page 45.
I would like clarification on how this can be compliant code without having to check whether the result of s32*s32 can fit into a short. is my understanding correct that the multiplication will take place as int32_t and then be casted to int16_t.
I would be grateful for some clarification on the topic.