Calculating the square of BigInteger
- by brickner
Hi,
I'm using .NET 4's System.Numerics.BigInteger structure.
I need to calculate the square (x^2) of very large numbers.
If x is a BigInteger, What is the time complexity of:
x*x;
or
BigInteger.Pow(x,2);
?
If it's worse than O(n^2), do you have a better implementation? Maybe something like Schönhage–Strassen algorithm?