You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the multiplication algorithm for integers is long multiplication, which is slow for large numbers (O(n^2)). For integers of size beyond a given threshold, faster algorithms should be used such as Karatsuba, Toom-Cook, and maybe also Schonage-Strassen. This will also allow a divide and conquer division to be used which will have the same time complexity as the multiplication algorithm.
The text was updated successfully, but these errors were encountered:
Hi @krakow10, sorry this comment completely slipped my attention... yeah we could use a conditional statement based on the digit count which we would evaluate at compile time. I hope to make good few changes to bnum for the next version (e.g. include initial support for arbitrary size floats), and I'll try to add at least Karatsuba in to these changes.
Currently, the multiplication algorithm for integers is long multiplication, which is slow for large numbers (O(n^2)). For integers of size beyond a given threshold, faster algorithms should be used such as Karatsuba, Toom-Cook, and maybe also Schonage-Strassen. This will also allow a divide and conquer division to be used which will have the same time complexity as the multiplication algorithm.
The text was updated successfully, but these errors were encountered: