I'm aware of a number of BigInt libraries for C on various platforms and how to use them but I'm intrigued: how do they work? How would I go about building my own library (I'm not going to try, no point re-inventing the wheel but I'm interested in how it might happen)? Can anyone point me towards tutorials etc that might explain the procedure / the basics?
Thanks,
Ninefingers.
Yacoby
I found that this wasn't a bad overview. However, if you want something more in depth (and almost guaranteed to be 100% correct), you probably want to read the relevant parts of The Art of Computer Programming, Volume 2.
来源:https://stackoverflow.com/questions/2217938/how-do-you-write-a-bigint-library-how-does-libgmp-work