Forum Discussion
Altera_Forum
Honored Contributor
9 years agoHow to square a fixed point number?
Assuming I have a 16 bit fixed point number that needs to be squared, how should this be implemented? The number format is Q2.14. Squaring it shall produce a result that is 32 bits instead a...
Altera_Forum
Honored Contributor
9 years ago --- Quote Start --- I guess they are signed and that the value is between -1.0 and 1.0 --- Quote End --- Why can we expect that the Q2.14 range (-2.0..+1.999) isn't utilized? Saturation logic should be used in the general case. Squaring is only a special case of fixed point multiply, by the way. It requires the same scaling operations. The simplest way to do the result scaling and saturation is to use IEEE fixed point package.