G
Gilbert Röhrbein
Hi coders,
I want to calculate big prime numbers. To test if a number is prime i want
to use the Miller-Rabin-Algo, but the calculation of "2^x" (for x > 1023)
isn't possible with datatypes like "double". The result is simply to big.
For example my C# calc says that "(2^1024) - (2^1024 + 1)" isn't 1. To
calculate numbers of arbitary size i can't use the standardized datatypes
of C# .NET.
The GNU MP is a package to handle with numbers of arbitary size. But it is
programmed for C and GNU compilers.
My question is: Is there a useful package(or a portation of GNU MP) for C#
..NET to calc numbers of arbitary size?
Though they know that bignums are essential for scientific calcs, MS
wasn't so friendly to bring a bignum datatype with the .NET Framework.
Gilbert Röhrbein
I want to calculate big prime numbers. To test if a number is prime i want
to use the Miller-Rabin-Algo, but the calculation of "2^x" (for x > 1023)
isn't possible with datatypes like "double". The result is simply to big.
For example my C# calc says that "(2^1024) - (2^1024 + 1)" isn't 1. To
calculate numbers of arbitary size i can't use the standardized datatypes
of C# .NET.
The GNU MP is a package to handle with numbers of arbitary size. But it is
programmed for C and GNU compilers.
My question is: Is there a useful package(or a portation of GNU MP) for C#
..NET to calc numbers of arbitary size?
Though they know that bignums are essential for scientific calcs, MS
wasn't so friendly to bring a bignum datatype with the .NET Framework.
Gilbert Röhrbein