Changes

Jump to: navigation, search

Programming:Integer Multiplication

40 bytes added, 07:41, 24 October 2015
/* Fast 8bit * 8bit Unsigned with only 512 bytes of tables */
Fast 8 bit unsigned multiplication with 16 bit result. It uses formula
<pre>
x*y = ((x+y)/2)^<sup>2 </sup> - ((x-y)/2)^<sup>2</sup>, if x+y is even = ((x+y-1)/2)^<sup>2 </sup> - ((x-y-1)/2)^<sup>2 </sup> + y, if x+y is odd and x>=y
</pre>
22
edits