Jul-04-2020, 08:28 PM
Assume n is length of the number in bits and let's use ^ for exponentiation.
Addition and subtraction are O(n).
Multiplication uses the Karatsuba algorithm that is O(n^1.585) instead of the classical algorithm which is O(n^2). The details are at https://bugs.python.org/issue560379 More improvements to multiplication are discussed at https://bugs.python.org/issue3944
Division is O(n^2).
There are some enhancement to exponentiation. The details are at https://bugs.python.org/issue936813
Addition and subtraction are O(n).
Multiplication uses the Karatsuba algorithm that is O(n^1.585) instead of the classical algorithm which is O(n^2). The details are at https://bugs.python.org/issue560379 More improvements to multiplication are discussed at https://bugs.python.org/issue3944
Division is O(n^2).
There are some enhancement to exponentiation. The details are at https://bugs.python.org/issue936813