From: <bor...@ko...> - 2004-01-05 19:56:32
|
Hi all, This is more of a question to Jscheme developers=2E Are there any plans to= support arbitrary precision integers? A simple way would be by using the java=2Emath=2EBigInteger class=2E I read a bit the source code and it does= n't seem such a huge modification=2E However, this is probably not the most efficient implementation=2E For example, I tried something like this: (define (fact n)=20 (let ((one (BigInteger=2E "1"))) =09 (if (=3D 0 (=2EintValue n))=20 =09 one =09 (fact (=2Emulitply n (=2Esubtract n one)))))) And then I had to stop the evaluation of (fact (BigInteger "1000")) after 20 minutes on a 1=2E6GHZ, 512MB laptop=2E Scheme implementations that I've= played with in the past would return the result almost right away on much slower machines=2E Anyway, the concern is really practical, not just for the sake of it=2E I'= m getting integer overflows while trying to solve a very practical problem=2E= =20 If you have thought about this and have ideas about what to do, I am willing to help with coding, testing etc=2E=20 BTW, I think Jscheme is great! Best, Boris -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web=2Ecom/ =2E |