Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That I don't know. It's probably first worth looking at what software can do: https://en.wikipedia.org/wiki/Multiplication_algorithm#Karat...

Naive multiplication is O(n^2) (where n = number of digits). The fastest algorithms seem to involve either cutting the numbers into pieces and doing multiplies, adds, shifts, and maybe subtracts on the pieces, and doing so recursively, which are O(n^[something slightly greater than 1]); or doing Fourier transforms, which apparently approach O(n log n). I don't know how easy it is to implement pieces of these more advanced approaches in hardware (especially if the size of the numbers isn't pre-chosen).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: