Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Toom–Cook multiplication
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Pointwise multiplication === Unlike multiplying the polynomials ''p''(·) and ''q''(·), multiplying the evaluated values ''p''(''a'') and ''q''(''a'') just involves multiplying integers — a smaller instance of the original problem. We recursively invoke our multiplication procedure to multiply each pair of evaluated points. In practical implementations, as the operands become smaller, the algorithm will switch to [[Multiplication algorithm#Long multiplication|schoolbook long multiplication]]. Letting ''r'' be the product polynomial, in our example we have: :{| |- |''r''(0) || = || ''p''(0)''q''(0) || = || 56789012 × 54321098 || = ||align="right"| 3084841486175176 |- |''r''(1) || = || ''p''(1)''q''(1) || = || 135813702 × 97639739 || = ||align="right"| 13260814415903778 |- |''r''(−1) || = || ''p''(−1)''q''(−1) || = || −21988766 × 11199987 || = ||align="right"| −246273893346042 |- |''r''(−2) || = || ''p''(−2)''q''(−2) || = || −100519632 × −31723594 || = ||align="right"| 3188843994597408 |- |''r''(∞) || = || ''p''(∞)''q''(∞) || = || 123456 × 98765 || = ||align="right"| 12193131840. |} As shown, these can also be negative. For large enough numbers, this is the most expensive step, the only step that is not linear in the sizes of ''m'' and ''n''.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)