Fixed-point arithmetic: Difference between revisions

Content deleted Content added
Tags: Mobile edit Mobile web edit Advanced mobile edit
No edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 232:
Their product is (exactly) the 53-bit integer {{thinspace|7|566|047|890|552|914}}, which has 30+20 = 50 implied fraction bits and therefore represents the fraction
: 6.{{thinspace|720|000|458|806|753|229|623|609|513|510|018|587|112|426|757|812|50}}
If we choose to represent this value in signed 16-bit fixed format with 8 fraction bits, we must divide the integer product by 2<sup>50−8</sup> = 2<sup>42</sup> and round the result; which can be achieved by adding 2<sup>41</sup> and shifting by 42 bits. The result is 1720, representing the value 1720/2<sup>8</sup> = 6.{{thinspace|718|75}}, or rather the interval between 3439/2<sup>9<sup> and 3441/2<sup>9<sup> (approximately 6.719 ± 0.002).
 
==Notations==