kaleb_pederson wrote: > Number isn't suitable for my needs; it allows for very large > numbers, but its precision is limited to 53-bits. I need between > 1024 and 4096 bit precision. Specifically, I will need to generate > prime numbers that are between 128 and 512 decimal digits in length, > determine if numbers are relatively prime with those numbers, etc.
If you don't mind porting some Javascript, Leemon Baird has written a public-domain Javascript library for handling arbitrary-precision arithmetic that you can try out and get the source code to here: http://www.leemon.com/crypto/BigInt.html If you're planning on doing a lot of such heavy lifting, I suspect that you'd likely see markedly better performance using a numerical analysis library compiled with processor-specific optimizations into native code, but to each his own.... Jim Cheng effectiveUI

