<s>
A	O
multiplication	B-Algorithm
algorithm	I-Algorithm
is	O
an	O
algorithm	O
(	O
or	O
method	O
)	O
to	O
multiply	O
two	O
numbers	O
.	O
</s>
<s>
Efficient	O
multiplication	B-Algorithm
algorithms	I-Algorithm
have	O
existed	O
since	O
the	O
advent	O
of	O
the	O
decimal	O
system	O
.	O
</s>
<s>
A	O
person	O
doing	O
long	O
multiplication	O
on	O
paper	O
will	O
write	O
down	O
all	O
the	O
products	O
and	O
then	O
add	O
them	O
together	O
;	O
an	O
abacus-user	O
will	O
sum	O
the	O
products	O
as	O
soon	O
as	O
each	O
one	O
is	O
computed	O
.	O
</s>
<s>
Some	O
chips	O
implement	O
long	O
multiplication	O
,	O
in	O
hardware	B-Architecture
or	O
in	O
microcode	B-Device
,	O
for	O
various	O
integer	O
and	O
floating-point	O
word	O
sizes	O
.	O
</s>
<s>
In	O
arbitrary-precision	B-Algorithm
arithmetic	I-Algorithm
,	O
it	O
is	O
common	O
to	O
use	O
long	O
multiplication	O
with	O
the	O
base	O
set	O
to	O
2w	O
,	O
where	O
w	O
is	O
the	O
number	O
of	O
bits	O
in	O
a	O
word	O
,	O
for	O
multiplying	O
relatively	O
small	O
numbers	O
.	O
</s>
<s>
When	O
implemented	O
in	O
software	O
,	O
long	O
multiplication	B-Algorithm
algorithms	I-Algorithm
must	O
deal	O
with	O
overflow	B-Error_Name
during	O
additions	O
,	O
which	O
can	O
be	O
expensive	O
.	O
</s>
<s>
Several	O
additions	O
can	O
then	O
be	O
performed	O
before	O
an	O
overflow	B-Error_Name
occurs	O
.	O
</s>
<s>
Computers	O
initially	O
used	O
a	O
very	O
similar	O
algorithm	O
to	O
long	O
multiplication	O
in	O
base	O
2	O
,	O
but	O
modern	O
processors	O
have	O
optimized	O
circuitry	O
for	O
fast	B-Algorithm
multiplications	I-Algorithm
using	O
more	O
efficient	O
algorithms	O
,	O
at	O
the	O
price	O
of	O
a	O
more	O
complex	O
hardware	B-Architecture
realization	O
.	O
</s>
<s>
Most	O
currently	O
available	O
microprocessors	O
implement	O
this	O
or	O
other	O
similar	O
algorithms	O
(	O
such	O
as	O
Booth	O
encoding	O
)	O
for	O
various	O
integer	O
and	O
floating-point	O
sizes	O
in	O
hardware	B-Architecture
multipliers	O
or	O
in	O
microcode	B-Device
.	O
</s>
<s>
In	O
some	O
cases	O
such	O
sequences	O
of	O
shifts	O
and	O
adds	O
or	O
subtracts	O
will	O
outperform	O
hardware	B-Architecture
multipliers	O
and	O
especially	O
dividers	O
.	O
</s>
<s>
Nevertheless	O
,	O
it	O
is	O
seen	O
as	O
a	O
usefully	O
explicit	O
method	O
to	O
introduce	O
the	O
idea	O
of	O
multiple-digit	O
multiplications	O
;	O
and	O
,	O
in	O
an	O
age	O
when	O
most	O
multiplication	O
calculations	O
are	O
done	O
using	O
a	O
calculator	O
or	O
a	O
spreadsheet	O
,	O
it	O
may	O
in	O
practice	O
be	O
the	O
only	O
multiplication	B-Algorithm
algorithm	I-Algorithm
that	O
some	O
students	O
will	O
ever	O
need	O
.	O
</s>
<s>
In	O
1980	O
,	O
Everett	O
L	O
.	O
Johnson	O
proposed	O
using	O
the	O
quarter	O
square	O
method	O
in	O
a	O
digital	B-General_Concept
multiplier	O
.	O
</s>
<s>
To	O
form	O
the	O
product	O
of	O
two	O
8-bit	O
integers	O
,	O
for	O
example	O
,	O
the	O
digital	B-General_Concept
device	O
forms	O
the	O
sum	O
and	O
difference	O
,	O
looks	O
both	O
quantities	O
up	O
in	O
a	O
table	O
of	O
squares	O
,	O
takes	O
the	O
difference	O
of	O
the	O
results	O
,	O
and	O
divides	O
by	O
four	O
by	O
shifting	O
two	O
bits	O
to	O
the	O
right	O
.	O
</s>
<s>
The	O
quarter	O
square	O
multiplier	O
technique	O
has	O
benefited	O
8-bit	O
systems	O
that	O
do	O
not	O
have	O
any	O
support	O
for	O
a	O
hardware	B-Architecture
multiplier	O
.	O
</s>
<s>
Charles	O
Putney	O
implemented	O
this	O
for	O
the	O
6502	B-General_Concept
.	O
</s>
<s>
Usual	O
algorithms	O
done	O
by	O
hand	O
have	O
asymptotic	O
complexity	O
of	O
,	O
but	O
in	O
1960	O
Anatoly	O
Karatsuba	O
discovered	O
that	O
better	O
complexity	O
was	O
possible	O
(	O
with	O
the	O
Karatsuba	B-Algorithm
algorithm	I-Algorithm
)	O
.	O
</s>
<s>
Currently	O
,	O
the	O
algorithm	O
with	O
the	O
best	O
computational	O
complexity	O
is	O
a	O
2019	O
algorithm	O
of	O
David	O
Harvey	O
and	O
Joris	O
van	O
der	O
Hoeven	O
,	O
which	O
uses	O
the	O
strategies	O
of	O
using	O
number-theoretic	O
transforms	O
introduced	O
with	O
the	O
Schönhage	B-Algorithm
–	I-Algorithm
Strassen	I-Algorithm
algorithm	I-Algorithm
to	O
multiply	O
integers	O
using	O
only	O
operations	O
.	O
</s>
<s>
For	O
systems	O
that	O
need	O
to	O
multiply	O
numbers	O
in	O
the	O
range	O
of	O
several	O
thousand	O
digits	O
,	O
such	O
as	O
computer	B-General_Concept
algebra	I-General_Concept
systems	I-General_Concept
and	O
bignum	B-Algorithm
libraries	O
,	O
long	O
multiplication	O
is	O
too	O
slow	O
.	O
</s>
<s>
These	O
systems	O
may	O
employ	O
Karatsuba	B-Algorithm
multiplication	I-Algorithm
,	O
which	O
was	O
discovered	O
in	O
1960	O
(	O
published	O
in	O
1962	O
)	O
.	O
</s>
<s>
This	O
is	O
an	O
example	O
of	O
what	O
is	O
now	O
called	O
a	O
divide-and-conquer	B-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
Karatsuba	B-Algorithm
multiplication	I-Algorithm
has	O
a	O
time	O
complexity	O
of	O
O(nlog23 )	O
≈	O
O( 	O
n1.585	O
)	O
,	O
making	O
this	O
method	O
significantly	O
faster	O
than	O
long	O
multiplication	O
.	O
</s>
<s>
Karatsuba	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
was	O
the	O
first	O
known	O
algorithm	O
for	O
multiplication	O
that	O
is	O
asymptotically	O
faster	O
than	O
long	O
multiplication	O
,	O
and	O
can	O
thus	O
be	O
viewed	O
as	O
the	O
starting	O
point	O
for	O
the	O
theory	O
of	O
fast	B-Algorithm
multiplications	I-Algorithm
.	O
</s>
<s>
The	O
algorithm	O
was	O
made	O
practical	O
and	O
theoretical	O
guarantees	O
were	O
provided	O
in	O
1971	O
by	O
Schönhage	O
and	O
Strassen	O
resulting	O
in	O
the	O
Schönhage	B-Algorithm
–	I-Algorithm
Strassen	I-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
The	O
details	O
are	O
the	O
following	O
:	O
We	O
choose	O
the	O
largest	O
integer	O
w	O
that	O
will	O
not	O
cause	O
overflow	B-Error_Name
during	O
the	O
process	O
outlined	O
below	O
.	O
</s>
<s>
In	O
2016	O
,	O
Covanov	O
and	O
Thomé	O
proposed	O
an	O
integer	B-Algorithm
multiplication	I-Algorithm
algorithm	I-Algorithm
based	O
on	O
a	O
generalization	O
of	O
Fermat	O
primes	O
that	O
conjecturally	O
achieves	O
a	O
complexity	O
bound	O
of	O
.	O
</s>
<s>
In	O
March	O
2019	O
,	O
David	O
Harvey	O
and	O
Joris	O
van	O
der	O
Hoeven	O
announced	O
their	O
discovery	O
of	O
an	O
multiplication	B-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
Lower	O
bounds	O
for	O
multiplication	O
are	O
also	O
known	O
for	O
some	O
classes	O
of	O
branching	B-Application
programs	I-Application
.	O
</s>
<s>
As	O
observed	O
by	O
Peter	O
Ungar	O
in	O
1963	O
,	O
one	O
can	O
reduce	O
the	O
number	O
of	O
multiplications	O
to	O
three	O
,	O
using	O
essentially	O
the	O
same	O
computation	O
as	O
Karatsuba	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
For	O
fast	O
Fourier	O
transforms	O
(	O
FFTs	O
)	O
(	O
or	O
any	O
linear	B-Architecture
transformation	I-Architecture
)	O
the	O
complex	O
multiplies	O
are	O
by	O
constant	O
coefficients	O
c+di	O
(	O
called	O
twiddle	O
factors	O
in	O
FFTs	O
)	O
,	O
in	O
which	O
case	O
two	O
of	O
the	O
additions	O
(	O
d−c	O
and	O
c+d	O
)	O
can	O
be	O
precomputed	O
.	O
</s>
<s>
However	O
,	O
trading	O
off	O
a	O
multiplication	O
for	O
an	O
addition	O
in	O
this	O
way	O
may	O
no	O
longer	O
be	O
beneficial	O
with	O
modern	O
floating-point	B-General_Concept
units	I-General_Concept
.	O
</s>
<s>
All	O
the	O
above	O
multiplication	B-Algorithm
algorithms	I-Algorithm
can	O
also	O
be	O
expanded	O
to	O
multiply	O
polynomials	O
.	O
</s>
<s>
Alternatively	O
the	O
Kronecker	B-Algorithm
substitution	I-Algorithm
technique	O
may	O
be	O
used	O
to	O
convert	O
the	O
problem	O
of	O
multiplying	O
polynomials	O
into	O
a	O
single	O
binary	O
multiplication	O
.	O
</s>
