Hi

Vortex : it's not about 1000! it's about how to handle big numbers, why I do it ! is becouse I am trying to learn.

X86asm : I did the calculation in maple, the number was so Big I needed more then a page to print it.

The number is more 2500 digits as bitRAKE stated, maple can calculate even 100 000! in less then 5 sec, the digits are more 500k. how do they do it ?!?

thenks to all the replys
Posted on 2004-05-13 11:01:30 by mistronr1
A more logical problem should be to find how many digit is 1000!



1000! = 1*2*3*4*5*.....*999*1000
log10( 1000! ) = log10( 1 ) + log10( 2 ) +.....+log10( 999 ) + log10( 1000 )


The expression log10( 1000 ) gives the number of digits:



#include <stdio.h>
#include <math.h>

void main()
{
double i,d=0;
for(i=1;i<1001;++i)
d+=log10(i);
printf("Total=%f",d);
}


Total=2567.604644 -----> 2567 digits

With the windows calculator : 10^2567.604644 = 4.02387 + E2567
Posted on 2004-05-13 12:33:30 by Vortex
mistronr1, it is a good method to study algorithms. I try to learn myself and improve my math skills in this way. Learning to multiple large numbers efficiently was quite educational experience. And the study of large primes is another way. I also study games for the same reason.
Posted on 2004-05-13 12:41:22 by bitRAKE