Assume this much:
I'm using a 16.16 fixed point system.
System is 32 bit.
CPU has no floating point processor.
Overflow is pretty imminent for multiplication for anything larger than 1.0 * 0.4999
To make one last assumption... lets say the values I'm working will not be so high as to cause overflow in this operation...
//assume that in practical application
//this assignment wouldn't be here as 2 fixed values would already exist...
fixed1 = (int)(1.2341 * 65536);
fixed2 = (int)(0.7854 * 65536);
mask1 = fixed1 & 0xFF; //mask off lower 8 bits
fixed1 >>= 8; //keep upper 24 bits... assume value here isn't too large...
answer = (((fixed2 * fixed1) >> 8) + ((fixed2 * mask1) >> 16));
So the question is... is this a stroke of genius (not to say it hasn't already been thought of or anything) or a complete waste of time?