Author: Sune Fischer
Date: 03:53:36 05/29/02
Go up one level in this thread
On May 28, 2002 at 19:32:58, Federico Corigliano wrote: >¿Are you created another type of program that is not related to the chess? > >The answers will be interesting. Sure :) My chess program is though the most complicated I've ever done so far. The second most complicated program was a math program using arbitrary precision. It could do multiplications, additions, arbitrary radix conversion(!), modulo and stuff like that on integers of arbitrary size (well they had to fit into memory). One of the functions I spent a lot of time on was the factorial (x!=1*2*...*x). I had a programming race with a friend, the target was to calculate 10^6!. He never made it, I went far beyond, my final record was 33,333,333! I still have the number stored on CDROM. It took almost a day to calculate it. Stirling confirms the first 15 digits or so, the number of digits is also correct. Much later I found that Mathematica actually is pretty good with large numbers, I used it to confirm the algorithm worked. My prog was 4x faster in calculating 10^6! (about 1 min. on my 1 gig IIRC). 10^5! could be done in about 1.5 sec!! I finally broke the program because I tried to overcome the limit of system memory, I wanted gigabytes size operands read in from the disk. I found a improved algorithm over the FFT I had been using, it needed fewer strides through the numbers to multiply, also the FFT is maxed out around 5 mill digits IIRC, then even double precision is not enough. I never made the improved algorithm work and lost interest because all competition was blown away long time ago. Chess has more competition, it will be a while before I win this one:) -S.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.